 
   toString: -> "CollisionNode(#{@bucket.join(", ")})"
 
-  #TODO -- implement getEntry()
-
-#TODO -- continue from here...
+  getEntry: (key) -> _.detect @bucket, (pair) -> equal(pair[0], key))
+
 
 # A sparse interior node using a bitmap to indicate which of the
 # indices 0..31 are in use.

    node = v.without(shift + 5, hash, key)
    if node?
      newSize = @size + node.size - v.size
      new BitmapIndexedNode(@bitmap, this.arrayWith(i, node), newSize)
    else
      newBitmap = @bitmap ^ bit
      switch util.bitCount(newBitmap)
        when 0 then null
        when 1 then this.arrayWithout(i)[0]
        else   new BitmapIndexedNode(newBitmap, this.arrayWithout(i), @size - 1)

  toString: -> "BitmapIndexedNode(#{@array.join(", ")})"

  arrayWith: (i, node) -> @array[...i].concat([node], @array[i+1..])

  arrayWithInsertion: (i, node) -> @array[...i].concat([node], @array[i..])

  arrayWithout: (i) -> @array[...i].concat(@array[i+1..])

BitmapIndexedNode.make = (shift, node) ->
  new BitmapIndexedNode(1 << util.mask(node.hash, shift), [node], node.size)

        new ArrayNode(table, util.mask(hash, shift), newNode, @size + 1)
    else
      v = @array[i]
      node = v.with(shift + 5, hash, key, value)
      newSize = @size + node.size - v.size
      new BitmapIndexedNode(@bitmap, util.arrayWith(@array, i, node), newSize)

  without: (shift, hash, key) ->
    [bit, i] = util.bitPosAndIndex(@bitmap, hash, shift)
