* HashMap which can use objects as keys
(array, isolatedUid)
| 3700 | * HashMap which can use objects as keys |
| 3701 | */ |
| 3702 | function HashMap(array, isolatedUid) { |
| 3703 | if (isolatedUid) { |
| 3704 | var uid = 0; |
| 3705 | this.nextUid = function() { |
| 3706 | return ++uid; |
| 3707 | }; |
| 3708 | } |
| 3709 | forEach(array, this.put, this); |
| 3710 | } |
| 3711 | HashMap.prototype = { |
| 3712 | /** |
| 3713 | * Store key value pair |