A utility class that works like a Map, but does not keep strong references to the values (allowing them to be garbage collected).
Map
When a value is garbage collected, it is automatically removed from the map.
Optional
Get the number of entries in the map.
Clear all values from the map.
Delete the value for a given key.
Time complexity: O(1), given that the length of the key is constant.
Get an iterator for all entries in the map.
Call a function for each entry in the map.
Get a value for a given key.
Check if a value exists for a given key.
Get an iterator for all keys in the map.
Add or update a value for a given key.
Get an iterator for all values in the map.
A utility class that works like a
Map
, but does not keep strong references to the values (allowing them to be garbage collected).When a value is garbage collected, it is automatically removed from the map.