* HashMap which can use objects as keys
(array, isolatedUid)
| 3307 | * HashMap which can use objects as keys |
| 3308 | */ |
| 3309 | function HashMap(array, isolatedUid) { |
| 3310 | if (isolatedUid) { |
| 3311 | var uid = 0; |
| 3312 | this.nextUid = function() { |
| 3313 | return ++uid; |
| 3314 | }; |
| 3315 | } |
| 3316 | forEach(array, this.put, this); |
| 3317 | } |
| 3318 | HashMap.prototype = { |
| 3319 | /** |
| 3320 | * Store key value pair |