interface Entry<out K, out V>
Represents a key/value pair held by a Map.
abstract val key: K Returns the key of this key/value pair. | |
abstract val value: V Returns the value of this key/value pair. |
open operator fun equals(other: Any?): Boolean Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements: | |
open fun hashCode(): Int Returns a hash code value for the object. The general contract of hashCode is: | |
open fun toString(): String Returns a string representation of the object. |
operator fun <K, V> Entry<K, V>.component1(): K Returns the key component of the map entry. | |
operator fun <K, V> Entry<K, V>.component2(): V Returns the value component of the map entry. | |
fun <K, V> Entry<K, V>.toPair(): Pair<K, V> Converts entry to Pair with key being first component and value being second. |
interface MutableEntry<K, V> : Entry<K, V> Represents a key/value pair held by a MutableMap. |
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/-entry/