Entry

Common
JVM
JS
Native
1.0
interface Entry<out K, out V>
(Common source) (JS source) (Native source)

Represents a key/value pair held by a Map.

Properties

Common
JVM
JS
Native
1.0

key

Returns the key of this key/value pair.

abstract val key: K
Common
JVM
JS
Native
1.0

value

Returns the value of this key/value pair.

abstract val value: V

Extension Functions

Common
JVM
JS
Native
1.0

component1

Returns the key component of the map entry.

operator fun <K, V> Entry<K, V>.component1(): K
Common
JVM
JS
Native
1.0

component2

Returns the value component of the map entry.

operator fun <K, V> Entry<K, V>.component2(): V
Common
JVM
JS
Native
1.0

toPair

Converts entry to Pair with key being first component and value being second.

fun <K, V> Entry<K, V>.toPair(): Pair<K, V>

Inheritors

Common
JVM
JS
Native
1.0

MutableEntry

Represents a key/value pair held by a MutableMap.

interface MutableEntry<K, V> : Entry<K, V>