HashMap
A mutable hash map associating each distinct key with one value.
Keys must retain stable equality and hash codes while stored. Nullable key and value types may store null; null keys hash to zero. Generic floating equality coalesces NaNs and distinguishes positive and negative zero. User equality and hashing callbacks retain their effects and exceptions.
Iteration order is unspecified. Read-only aliases and views observe later mutations. Inserting a new key, removing an existing key or clearing a non-empty map invalidates iterators; replacing a value does not. Storage, entries, views and iterators use the ordinary Guest heap and instruction budgets.
Parameters
requested bucket capacity, not the initial size or an element limit.
Type Parameters
key type.
value type.
See also
Throws
if initialCapacity is negative or greater than 1,073,741,824.