Mutable Object Float Map
MutableObjectFloatMap is a container with a MutableMap-like interface for keys with reference types and Float primitives for values.
The underlying implementation is designed to avoid allocations from boxing, and insertion, removal, retrieval, and iteration operations. Allocations may still happen on insertion when the underlying storage needs to grow to accommodate newly added entries to the table. In addition, this implementation minimizes memory usage by avoiding the use of separate objects to hold key/value pairs.
This implementation is not thread-safe: if multiple threads access this container concurrently, and one or more threads modify the structure of the map (insertion or removal for instance), the calling code must provide the appropriate synchronization. Multiple threads are safe to read from this map concurrently if no write is happening.
Parameters
The initial desired capacity for this container. the container will honor this value by guaranteeing its internal structures can hold that many entries without requiring any allocations. The initial capacity can be set to 0.
See also
Constructors
Creates a new MutableObjectFloatMap
Properties
Functions
Returns true if the specified key is present in this hash map, false otherwise.
Returns true if the specified value is present in this hash map, false otherwise.
Iterates over every key stored in this map by invoking the specified block lambda.
Iterates over every value stored in this map by invoking the specified block lambda.
Returns the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key.
Returns true if this map is not empty.
Creates a String from the entries, separated by separator and using prefix before and postfix after, if supplied.
Puts all the key/value mappings in the from map into this map.
Creates a new mapping from key to value in this map. If key is already present in the map, the association is modified and the previously associated value is replaced with value. If key is not present, a new entry is added to the map, which may require to grow the underlying storage and cause allocations.
Puts all the key/value mappings in the from map into this map.
Creates a new mapping from key to value in this map. If key is already present in the map, the association is modified and the previously associated value is replaced with value. If key is not present, a new entry is added to the map, which may require to grow the underlying storage and cause allocations.
Trims this MutableObjectFloatMap's storage so it is sized appropriately to hold the current mappings.