 
 # The IntSet class.
 class IntSet extends Collection
-  this::class = this
   @name = "IntSet"
 
   # Returns the elements as a stream

# The HashMap class provides the public API and serves as a wrapper
# for the various node classes that hold the actual information.
class HashMap extends Collection
  this::class = this
  @name = "HashMap"

  # Returns the (key,value)-pairs as a stream

  # Generic update method with support for multiple arguments
  update: (args, step) ->
    newroot = util.reduce(args, step, @root)
    if newroot != @root then new @constructor(newroot) else this

  # Returns the elements in this set as an array.
  toArray: -> @entries?.toArray() or []

  # Returns a string representation of this collection.
  toString: -> "#{@constructor.name}(#{@root})"


# --------------------------------------------------------------------
