ReadonlykeyThe key of the mapping. Time: O(1).
ReadonlyvalueThe current value of the mapping while its key is present in the map; afterwards, the value
this entry last returned or wrote. Time: as the map documents — O(1) average for a HashMap;
O(1) while the mapping is stored and O(log n) once it has left the map for a TreeMap.
The value-equality protocol; delegates to equals. Time: as equals.
The value-equality protocol: the same for equal entries. Time: as value, plus the calls.
Returns whether other is an entry whose key and value are equal to this entry's under
equals.
Time: as reading value, plus the protocol methods.
Any value.
true when other is an equal entry.
Returns the mapping as text, e.g. 'a' => 1.
Time: as value, plus O(length of the output).
The text.
One key–value mapping of a map: a live handle on one key of one map.
keyis the stored key.valuereads the map's current value while the key is present, and afterwards the value it last returned. Destructuring yields the same two:const [k, v] = entry. Two entries are equal when their keys and values are equal underequals.Example