Skip to content
Buy me a coffee

SimpleImmutableEntry

Defined in: src/abstract/AbstractMap.ts:456

An immutable key/value pair: setValue throws UnsupportedOperationException. Equality and hash follow the map-entry contract, so it equals any entry with an equal key and value; toString() gives key=value.

K

V

new SimpleImmutableEntry<K, V>(entry): SimpleImmutableEntry<K, V>

Defined in: src/abstract/AbstractMap.ts:460

Creates an entry with the key and value of entry.

MapEntry<K, V>

SimpleImmutableEntry<K, V>

new SimpleImmutableEntry<K, V>(key, value): SimpleImmutableEntry<K, V>

Defined in: src/abstract/AbstractMap.ts:462

Creates an entry mapping key to value; both may be null.

K

V

SimpleImmutableEntry<K, V>

[INSPECT](): string

Defined in: src/abstract/AbstractMap.ts:492

Node’s util.inspect hook: console.log prints the toString() form.

string


equals(o): boolean

Defined in: src/abstract/AbstractMap.ts:484

Returns true if o is a map entry with an equal key and an equal value.

unknown

boolean

MapEntry.equals


getKey(): K

Defined in: src/abstract/AbstractMap.ts:469

Returns the key.

K

MapEntry.getKey


getValue(): V

Defined in: src/abstract/AbstractMap.ts:473

Returns the value.

V

MapEntry.getValue


hashCode(): number

Defined in: src/abstract/AbstractMap.ts:488

Returns hashCode(key) ^ hashCode(value).

number

MapEntry.hashCode


setValue(_value): V

Defined in: src/abstract/AbstractMap.ts:480

Always throws.

V

V

UnsupportedOperationException always

MapEntry.setValue


toString(): string

Defined in: src/abstract/AbstractMap.ts:496

Returns key=value.

string

MapEntry.toString