MutableEntry

expect interface MutableEntry<K, V> : Map.Entry<K, V> (source)

Represents a key/value pair held by a MutableMap.

Map entries are not supposed to be stored separately or used long after they are obtained. The behavior of an entry is undefined if the backing map has been modified after the entry was obtained.

Since Kotlin

1.0
actual interface MutableEntry<K, V> : Map.Entry<K, V> (source)

Represents a key/value pair held by a MutableMap.

Map entries are not supposed to be stored separately or used long after they are obtained. The behavior of an entry is undefined if the backing map has been modified after the entry was obtained.

Since Kotlin

1.1
actual interface MutableEntry<K, V> : Map.Entry<K, V> (source)

Represents a key/value pair held by a MutableMap.

Map entries are not supposed to be stored separately or used long after they are obtained. The behavior of an entry is undefined if the backing map has been modified after the entry was obtained.

Since Kotlin

1.0
actual interface MutableEntry<K, V> : Map.Entry<K, V> (source)

Represents a key/value pair held by a MutableMap.

Map entries are not supposed to be stored separately or used long after they are obtained. The behavior of an entry is undefined if the backing map has been modified after the entry was obtained.

Since Kotlin

1.3
actual interface MutableEntry<K, V> : Map.Entry<K, V> (source)

Represents a key/value pair held by a MutableMap.

Map entries are not supposed to be stored separately or used long after they are obtained. The behavior of an entry is undefined if the backing map has been modified after the entry was obtained.

Since Kotlin

1.8
actual interface MutableEntry<K, V> : Map.Entry<K, V> (source)

Represents a key/value pair held by a MutableMap.

Map entries are not supposed to be stored separately or used long after they are obtained. The behavior of an entry is undefined if the backing map has been modified after the entry was obtained.

Since Kotlin

1.8

Properties

Link copied to clipboard
expect abstract val key: K

Returns the key of this key/value pair.

Since Kotlin 1.0
actual abstract val key: K

Returns the key of this key/value pair.

Since Kotlin 1.1
actual abstract val key: K

Returns the key of this key/value pair.

Since Kotlin 1.0
actual abstract val key: K

Returns the key of this key/value pair.

Since Kotlin 1.3
actual abstract val key: K

Returns the key of this key/value pair.

Since Kotlin 1.8
actual abstract val key: K

Returns the key of this key/value pair.

Since Kotlin 1.8
Link copied to clipboard
expect abstract val value: V

Returns the value of this key/value pair.

Since Kotlin 1.0
actual abstract val value: V

Returns the value of this key/value pair.

Since Kotlin 1.1
actual abstract val value: V

Returns the value of this key/value pair.

Since Kotlin 1.0
actual abstract val value: V

Returns the value of this key/value pair.

Since Kotlin 1.3
actual abstract val value: V

Returns the value of this key/value pair.

Since Kotlin 1.8
actual abstract val value: V

Returns the value of this key/value pair.

Since Kotlin 1.8

Functions

Link copied to clipboard
inline operator fun <K, V> Map.Entry<K, V>.component1(): K

Returns the key component of the map entry.

Since Kotlin 1.0
Link copied to clipboard
inline operator fun <K, V> Map.Entry<K, V>.component2(): V

Returns the value component of the map entry.

Since Kotlin 1.0
Link copied to clipboard
expect abstract fun setValue(newValue: V): V

Changes the value associated with the key of this entry.

Since Kotlin 1.0
actual abstract fun setValue(newValue: V): V

Changes the value associated with the key of this entry.

Since Kotlin 1.1
actual abstract fun setValue(newValue: V): V

Changes the value associated with the key of this entry.

Since Kotlin 1.0
actual abstract fun setValue(newValue: V): V

Changes the value associated with the key of this entry.

Since Kotlin 1.3
actual abstract fun setValue(newValue: V): V

Changes the value associated with the key of this entry.

Since Kotlin 1.8
actual abstract fun setValue(newValue: V): V

Changes the value associated with the key of this entry.

Since Kotlin 1.8
Link copied to clipboard
inline fun <K, V> Map.Entry<K, V>.toPair(): Pair<K, V>

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

Since Kotlin 1.0