A hash-table based implementation of Map.
The keys of a HashMap
must have consistent Object.operator==
and Object.hashCode implementations. This means that the ==
operator
must define a stable equivalence relation on the keys (reflexive,
symmetric, transitive, and consistent over time), and that hashCode
must be the same for objects that are considered equal by ==
.
The map allows null
as a key.
Iterating the map's keys, values or entries (through forEach) may happen in any order. The itearation order only changes when the map is modified. Values are iterated in the same order as their associated keys, so iterating the keys and values in parallel will give matching key and value pairs.