A hash-table based implementation of Map.
The insertion order of keys is remembered, and keys are iterated in the order they were inserted into the map. Values are iterated in their corresponding key's order. Changing a key's value, when the key is already in the map, does not change the iteration order, but removing the key and adding it again will make it be last in the iteration order.
The keys of a LinkedHashMap
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.