* HashMap which can use objects as keys
(array, isolatedUid)
| 3686 | * HashMap which can use objects as keys |
| 3687 | */ |
| 3688 | function HashMap(array, isolatedUid) { |
| 3689 | if (isolatedUid) { |
| 3690 | var uid = 0; |
| 3691 | this.nextUid = function() { |
| 3692 | return ++uid; |
| 3693 | }; |
| 3694 | } |
| 3695 | forEach(array, this.put, this); |
| 3696 | } |
| 3697 | HashMap.prototype = { |
| 3698 | /** |
| 3699 | * Store key value pair |