     pairs.push([key, val])
     val
   unset: (key) ->
-    if pairs = @_storage[key]
+    if pairs = @_storage[@hashKeyFor(key)]
       for [obj,value], index in pairs
         if @equality(obj, key)
           pairs.splice(index,1)
           @length--
           return
   getOrSet: Batman.Observable.getOrSet
+  hashKeyFor: (obj) -> obj?.hashKey?() or obj
   equality: (lhs, rhs) ->
     return true if lhs is rhs
     return true if lhs isnt lhs and rhs isnt rhs # when both are NaN


  clear: @mutation(Batman.SimpleHash::clear)
  equality: Batman.SimpleHash::equality

  for k in ['hasKey', 'forEach', 'isEmpty', 'keys', 'merge']
    proto = @prototype

  isEvent: true
  isEqual: (other) ->
    @constructor is other.constructor and @base is other.base and @key is other.key
  hashKey: ->
    @hashKey = -> key
    key = "<Batman.Event base: #{Batman.Hash::hashKeyFor(@base)}, key: \"#{Batman.Hash::hashKeyFor(@key)}\">"

  addHandler: (handler) ->
    @handlers.add(handler)
