* HashMap which can use objects as keys
(array, isolatedUid)
| 3852 | * HashMap which can use objects as keys |
| 3853 | */ |
| 3854 | function HashMap(array, isolatedUid) { |
| 3855 | if (isolatedUid) { |
| 3856 | var uid = 0; |
| 3857 | this.nextUid = function() { |
| 3858 | return ++uid; |
| 3859 | }; |
| 3860 | } |
| 3861 | forEach(array, this.put, this); |
| 3862 | } |
| 3863 | HashMap.prototype = { |
| 3864 | /** |
| 3865 | * Store key value pair |