nfrankel
09/20/2019, 10:15 PMinternal class MapEntry<K, V>(override val key: K, override val value: V) : Map.Entry<K, V>
internal fun <K, V> Pair<K, V>.toEntry() = MapEntry(first, second)
Matteo Mirk
09/23/2019, 1:19 PMimport java.util.AbstractMap
and avoid to create your own entry class:
... = AbstractMap.SimpleEntry(first, second)
nfrankel
09/23/2019, 2:56 PMMatteo Mirk
09/23/2019, 3:06 PM