WeakMap allows mapping of object keys to arbitrary values.

The keys are considered to be weak references on static targets.

See Map for documentation details.

See also:

Constructor

@:keepnew()

Creates a new WeakMap.

Methods

@:keepcopy():WeakMap<K, V>

@:has_untyped@:keepexists(key:K):Bool

@:has_untyped@:keepget(key:K):Null<V>

@:has_untyped@:keepiterator():Iterator<V>

Available on cpp, lua, macro, js, flash, hl, neko, cs, php, python

iterator():Iterator<V>

Available on java

Returns an iterator of all values in the hashtable. Implementation detail: Do not set() any new value while iterating, as it may cause a resize, which will break iteration

@:has_untyped@:keepkeys():Iterator<K>

Available on cpp, lua, macro, js, flash, hl, neko, cs, php, python

keys():Iterator<K>

Available on java

Returns an iterator of all keys in the hashtable. Implementation detail: Do not set() any new value while iterating, as it may cause a resize, which will break iteration

@:has_untyped@:keepremove(key:K):Bool

@:has_untyped@:keepset(key:K, value:V):Void

@:has_untyped@:keeptoString():String

Available on cpp, lua, macro, js, flash, hl, neko, cs, php, python

toString():String

Available on java

Returns an displayable representation of the hashtable content.