* HashMap which can use objects as keys
(array, isolatedUid)
| 3356 | * HashMap which can use objects as keys |
| 3357 | */ |
| 3358 | function HashMap(array, isolatedUid) { |
| 3359 | if (isolatedUid) { |
| 3360 | var uid = 0; |
| 3361 | this.nextUid = function() { |
| 3362 | return ++uid; |
| 3363 | }; |
| 3364 | } |
| 3365 | forEach(array, this.put, this); |
| 3366 | } |
| 3367 | HashMap.prototype = { |
| 3368 | /** |
| 3369 | * Store key value pair |