* HashMap which can use objects as keys
(array, isolatedUid)
| 3581 | * HashMap which can use objects as keys |
| 3582 | */ |
| 3583 | function HashMap(array, isolatedUid) { |
| 3584 | if (isolatedUid) { |
| 3585 | var uid = 0; |
| 3586 | this.nextUid = function() { |
| 3587 | return ++uid; |
| 3588 | }; |
| 3589 | } |
| 3590 | forEach(array, this.put, this); |
| 3591 | } |
| 3592 | HashMap.prototype = { |
| 3593 | /** |
| 3594 | * Store key value pair |