ObjectMap
haxe.ds.ObjectMap (Class)
ObjectMap allows mapping of object keys to arbitrary values.
On static targets, the keys are considered to be strong references. Refer
to haxe.ds.WeakMap
for a weak reference version.
See Map
for documentation details.
See: https://haxe.org/manual/std-Map.html
Instance Members
set(key: haxe.ds.ObjectMap.K, value: haxe.ds.ObjectMap.V): Void
See Map.set
Name |
Type |
key |
haxe.ds.ObjectMap.K |
value |
haxe.ds.ObjectMap.V |
get(key: haxe.ds.ObjectMap.K): Null<haxe.ds.ObjectMap.V>
See Map.get
Name |
Type |
key |
haxe.ds.ObjectMap.K |
Returns |
Null<haxe.ds.ObjectMap.V> |
remove(key: haxe.ds.ObjectMap.K): Bool
See Map.remove
Name |
Type |
key |
haxe.ds.ObjectMap.K |
See Map.keys
(cs, java) Implementation detail: Do not set()
any new value while
iterating, as it may cause a resize, which will break iteration.
See Map.iterator
(cs, java) Implementation detail: Do not set()
any new value while
iterating, as it may cause a resize, which will break iteration.
See Map.keyValueIterator
Creates a new ObjectMap.
Private Members
This is the most important structure here and the reason why it's so fast.
It's an array of all the hashes contained in the table. These hashes cannot be 0 nor 1,
which stand for "empty" and "deleted" states.
The lookup algorithm will keep looking until a 0 or the key wanted is found;
The insertion algorithm will do the same but will also break when FLAG_DEL is found;
cachedKey: haxe.ds.ObjectMap.K
lookup(key: haxe.ds.ObjectMap.K): Int
Name |
Type |
key |
haxe.ds.ObjectMap.K |
Name |
Type |
newNBuckets |
Int |