Skip to content
Buy me a coffee

MapEntry

Defined in: src/interfaces/Map.ts:9

A key-value pair of a map. Entries reached by iterating a map’s entrySet() are live: setValue writes through to the map. Entries returned by navigation and first/last methods are immutable snapshots.

K

V

equals(o): boolean

Defined in: src/interfaces/Map.ts:22

Returns true if o is an entry with an equal key and an equal value (by Objects.equals).

unknown

boolean


getKey(): K

Defined in: src/interfaces/Map.ts:11

Returns the key.

K


getValue(): V

Defined in: src/interfaces/Map.ts:13

Returns the value.

V


hashCode(): number

Defined in: src/interfaces/Map.ts:24

Returns hash(key) ^ hash(value), so equal entries hash equally.

number


setValue(value): V

Defined in: src/interfaces/Map.ts:20

Replaces the value (and, for a live entry, the value in the backing map).

V

V

the previous value

UnsupportedOperationException if the entry is immutable (a snapshot or from an unmodifiable map)

NullPointerException if value is null and the backing map rejects null values


toString(): string

Defined in: src/interfaces/Map.ts:26

Returns key=value.

string