MutableMap

interface MutableMap<K, V> : Map<K, V>

A modifiable collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key.

interface MutableMap<K, V> : Map<K, V>

A modifiable collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key.

interface MutableMap<K, V> : Map<K, V>

A modifiable collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key.

interface MutableMap<K, V> : Map<K, V>

A modifiable collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key.

Parameters

K

the type of map keys. The map is invariant in its key type.

V

the type of map values. The mutable map is invariant in its value type.

K

the type of map keys. The map is invariant in its key type.

V

the type of map values. The mutable map is invariant in its value type.

K

the type of map keys. The map is invariant in its key type.

V

the type of map values. The mutable map is invariant in its value type.

K

the type of map keys. The map is invariant in its key type.

V

the type of map values. The mutable map is invariant in its value type.

Types

Link copied to clipboard
interface MutableEntry<K, V> : Map.Entry<K, V>

Represents a key/value pair held by a MutableMap.

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

Represents a key/value pair held by a MutableMap.

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

Represents a key/value pair held by a MutableMap.

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

Represents a key/value pair held by a MutableMap.

Functions

Link copied to clipboard
abstract fun clear()

Removes all elements from this map.

abstract fun clear()

Removes all elements from this map.

abstract fun clear()

Removes all elements from this map.

abstract fun clear()

Removes all elements from this map.

Link copied to clipboard
abstract fun containsKey(key: K): Boolean
abstract fun containsKey(key: K): Boolean

Returns true if the map contains the specified key.

abstract fun containsKey(key: K): Boolean

Returns true if the map contains the specified key.

abstract fun containsKey(key: K): Boolean

Returns true if the map contains the specified key.

Link copied to clipboard
abstract fun containsValue(value: V): Boolean
abstract fun containsValue(value: V): Boolean

Returns true if the map maps one or more keys to the specified value.

abstract fun containsValue(value: V): Boolean

Returns true if the map maps one or more keys to the specified value.

abstract fun containsValue(value: V): Boolean

Returns true if the map maps one or more keys to the specified value.

Link copied to clipboard
abstract operator fun get(key: K): V?
abstract operator fun get(key: K): V?

Returns the value corresponding to the given key, or null if such a key is not present in the map.

abstract operator fun get(key: K): V?

Returns the value corresponding to the given key, or null if such a key is not present in the map.

abstract operator fun get(key: K): V?

Returns the value corresponding to the given key, or null if such a key is not present in the map.

getOrDefault
Link copied to clipboard
open fun getOrDefault(key: K, defaultValue: V): V

Returns the value corresponding to the given key, or defaultValue if such a key is not present in the map.

Since Kotlin 1.1
open fun getOrDefault(key: K, defaultValue: V): V

Returns the value corresponding to the given key, or defaultValue if such a key is not present in the map.

Since Kotlin 1.1
open fun getOrDefault(key: K, defaultValue: V): V

Returns the value corresponding to the given key, or defaultValue if such a key is not present in the map.

Since Kotlin 1.1
Link copied to clipboard
abstract fun isEmpty(): Boolean
abstract fun isEmpty(): Boolean

Returns true if the map is empty (contains no elements), false otherwise.

abstract fun isEmpty(): Boolean

Returns true if the map is empty (contains no elements), false otherwise.

abstract fun isEmpty(): Boolean

Returns true if the map is empty (contains no elements), false otherwise.

Link copied to clipboard
abstract fun put(key: K, value: V): V?

Associates the specified value with the specified key in the map.

abstract fun put(key: K, value: V): V?

Associates the specified value with the specified key in the map.

abstract fun put(key: K, value: V): V?

Associates the specified value with the specified key in the map.

abstract fun put(key: K, value: V): V?

Associates the specified value with the specified key in the map.

Link copied to clipboard
abstract fun putAll(from: Map<out K, V>)

Updates this map with key/value pairs from the specified map from.

abstract fun putAll(from: Map<out K, V>)

Updates this map with key/value pairs from the specified map from.

abstract fun putAll(from: Map<out K, V>)

Updates this map with key/value pairs from the specified map from.

abstract fun putAll(from: Map<out K, V>)

Updates this map with key/value pairs from the specified map from.

Link copied to clipboard
abstract fun remove(key: K): V?

Removes the specified key and its corresponding value from this map.

open fun remove(key: K, value: V): Boolean

Removes the entry for the specified key only if it is mapped to the specified value.

Since Kotlin 1.1
abstract fun remove(key: K): V?

Removes the specified key and its corresponding value from this map.

open fun remove(key: K, value: V): Boolean

Removes the entry for the specified key only if it is mapped to the specified value.

Since Kotlin 1.1
abstract fun remove(key: K): V?

Removes the specified key and its corresponding value from this map.

open fun remove(key: K, value: V): Boolean

Removes the entry for the specified key only if it is mapped to the specified value.

Since Kotlin 1.1
abstract fun remove(key: K): V?

Removes the specified key and its corresponding value from this map.

Properties

Link copied to clipboard
abstract override val entries: MutableSet<MutableMap.MutableEntry<K, V>>

Returns a MutableSet of all key/value pairs in this map.

abstract override val entries: MutableSet<MutableMap.MutableEntry<K, V>>

Returns a MutableSet of all key/value pairs in this map.

abstract override val entries: MutableSet<MutableMap.MutableEntry<K, V>>

Returns a MutableSet of all key/value pairs in this map.

abstract override val entries: MutableSet<MutableMap.MutableEntry<K, V>>

Returns a MutableSet of all key/value pairs in this map.

Link copied to clipboard
abstract override val keys: MutableSet<K>

Returns a MutableSet of all keys in this map.

abstract override val keys: MutableSet<K>

Returns a MutableSet of all keys in this map.

abstract override val keys: MutableSet<K>

Returns a MutableSet of all keys in this map.

abstract override val keys: MutableSet<K>

Returns a MutableSet of all keys in this map.

Link copied to clipboard
abstract val size: Int
abstract val size: Int

Returns the number of key/value pairs in the map.

abstract val size: Int

Returns the number of key/value pairs in the map.

abstract val size: Int

Returns the number of key/value pairs in the map.

Link copied to clipboard
abstract override val values: MutableCollection<V>

Returns a MutableCollection of all values in this map. Note that this collection may contain duplicate values.

abstract override val values: MutableCollection<V>

Returns a MutableCollection of all values in this map. Note that this collection may contain duplicate values.

abstract override val values: MutableCollection<V>

Returns a MutableCollection of all values in this map. Note that this collection may contain duplicate values.

abstract override val values: MutableCollection<V>

Returns a MutableCollection of all values in this map. Note that this collection may contain duplicate values.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
inline fun <K, V> Map<out K, V>.all(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.all(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.all(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.all(predicate: (Map.Entry<K, V>) -> Boolean): Boolean

Returns true if all entries match the given predicate.

Link copied to clipboard
fun <K, V> Map<out K, V>.any(): Boolean
fun <K, V> Map<out K, V>.any(): Boolean
fun <K, V> Map<out K, V>.any(): Boolean
fun <K, V> Map<out K, V>.any(): Boolean

Returns true if map has at least one entry.

inline fun <K, V> Map<out K, V>.any(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.any(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.any(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.any(predicate: (Map.Entry<K, V>) -> Boolean): Boolean

Returns true if at least one entry matches the given predicate.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.asIterable(): Iterable<Map.Entry<K, V>>
inline fun <K, V> Map<out K, V>.asIterable(): Iterable<Map.Entry<K, V>>
inline fun <K, V> Map<out K, V>.asIterable(): Iterable<Map.Entry<K, V>>
inline fun <K, V> Map<out K, V>.asIterable(): Iterable<Map.Entry<K, V>>

Creates an Iterable instance that wraps the original map returning its entries when being iterated.

Link copied to clipboard
fun <K, V> Map<out K, V>.asSequence(): Sequence<Map.Entry<K, V>>
fun <K, V> Map<out K, V>.asSequence(): Sequence<Map.Entry<K, V>>
fun <K, V> Map<out K, V>.asSequence(): Sequence<Map.Entry<K, V>>
fun <K, V> Map<out K, V>.asSequence(): Sequence<Map.Entry<K, V>>

Creates a Sequence instance that wraps the original map returning its entries when being iterated.

Link copied to clipboard
inline operator fun <K, V> Map<out K, V>.contains(key: K): Boolean
inline operator fun <K, V> Map<out K, V>.contains(key: K): Boolean
inline operator fun <K, V> Map<out K, V>.contains(key: K): Boolean
inline operator fun <K, V> Map<out K, V>.contains(key: K): Boolean

Checks if the map contains the given key.

Link copied to clipboard
inline fun <K> Map<out K, *>.containsKey(key: K): Boolean
inline fun <K> Map<out K, *>.containsKey(key: K): Boolean
inline fun <K> Map<out K, *>.containsKey(key: K): Boolean
inline fun <K> Map<out K, *>.containsKey(key: K): Boolean

Returns true if the map contains the specified key.

Link copied to clipboard
inline fun <K, V> Map<K, V>.containsValue(value: V): Boolean
inline fun <K, V> Map<K, V>.containsValue(value: V): Boolean
inline fun <K, V> Map<K, V>.containsValue(value: V): Boolean
inline fun <K, V> Map<K, V>.containsValue(value: V): Boolean

Returns true if the map maps one or more keys to the specified value.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.count(): Int
inline fun <K, V> Map<out K, V>.count(): Int
inline fun <K, V> Map<out K, V>.count(): Int
inline fun <K, V> Map<out K, V>.count(): Int

Returns the number of entries in this map.

inline fun <K, V> Map<out K, V>.count(predicate: (Map.Entry<K, V>) -> Boolean): Int
inline fun <K, V> Map<out K, V>.count(predicate: (Map.Entry<K, V>) -> Boolean): Int
inline fun <K, V> Map<out K, V>.count(predicate: (Map.Entry<K, V>) -> Boolean): Int
inline fun <K, V> Map<out K, V>.count(predicate: (Map.Entry<K, V>) -> Boolean): Int

Returns the number of entries matching the given predicate.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.filter(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filter(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filter(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filter(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>

Returns a new map containing all key-value pairs matching the given predicate.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.filterKeys(predicate: (K) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterKeys(predicate: (K) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterKeys(predicate: (K) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterKeys(predicate: (K) -> Boolean): Map<K, V>

Returns a map containing all key-value pairs with keys matching the given predicate.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.filterNot(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterNot(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterNot(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterNot(predicate: (Map.Entry<K, V>) -> Boolean): Map<K, V>

Returns a new map containing all key-value pairs not matching the given predicate.

Link copied to clipboard
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterNotTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterNotTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterNotTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterNotTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M

Appends all entries not matching the given predicate into the given destination.

Link copied to clipboard
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M
inline fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterTo(destination: M, predicate: (Map.Entry<K, V>) -> Boolean): M

Appends all entries matching the given predicate into the mutable map given as destination parameter.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.filterValues(predicate: (V) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterValues(predicate: (V) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterValues(predicate: (V) -> Boolean): Map<K, V>
inline fun <K, V> Map<out K, V>.filterValues(predicate: (V) -> Boolean): Map<K, V>

Returns a map containing all key-value pairs with values matching the given predicate.

Link copied to clipboard
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOf(transform: (Map.Entry<K, V>) -> R?): R
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOf(transform: (Map.Entry<K, V>) -> R?): R
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOf(transform: (Map.Entry<K, V>) -> R?): R
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOf(transform: (Map.Entry<K, V>) -> R?): R

Returns the first non-null value produced by transform function being applied to entries of this map in iteration order, or throws NoSuchElementException if no non-null value was produced.

Link copied to clipboard
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOfOrNull(transform: (Map.Entry<K, V>) -> R?): R?
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOfOrNull(transform: (Map.Entry<K, V>) -> R?): R?
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOfOrNull(transform: (Map.Entry<K, V>) -> R?): R?
inline fun <K, V, R : Any> Map<out K, V>.firstNotNullOfOrNull(transform: (Map.Entry<K, V>) -> R?): R?

Returns the first non-null value produced by transform function being applied to entries of this map in iteration order, or null if no non-null value was produced.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Iterable<R>): List<R>
@JvmName(name = "flatMapSequence")
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Sequence<R>): List<R>
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Iterable<R>): List<R>
@JvmName(name = "flatMapSequence")
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Sequence<R>): List<R>
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Iterable<R>): List<R>
@JvmName(name = "flatMapSequence")
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Sequence<R>): List<R>
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Iterable<R>): List<R>
@JvmName(name = "flatMapSequence")
inline fun <K, V, R> Map<out K, V>.flatMap(transform: (Map.Entry<K, V>) -> Sequence<R>): List<R>

Returns a single list of all elements yielded from results of transform function being invoked on each entry of original map.

Link copied to clipboard
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Iterable<R>): C
@JvmName(name = "flatMapSequenceTo")
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Sequence<R>): C
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Iterable<R>): C
@JvmName(name = "flatMapSequenceTo")
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Sequence<R>): C
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Iterable<R>): C
@JvmName(name = "flatMapSequenceTo")
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Sequence<R>): C
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Iterable<R>): C
@JvmName(name = "flatMapSequenceTo")
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo(destination: C, transform: (Map.Entry<K, V>) -> Sequence<R>): C

Appends all elements yielded from results of transform function being invoked on each entry of original map, to the given destination.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.forEach(action: (Map.Entry<K, V>) -> Unit)
inline fun <K, V> Map<out K, V>.forEach(action: (Map.Entry<K, V>) -> Unit)
inline fun <K, V> Map<out K, V>.forEach(action: (Map.Entry<K, V>) -> Unit)
inline fun <K, V> Map<out K, V>.forEach(action: (Map.Entry<K, V>) -> Unit)

Performs the given action on each entry.

Link copied to clipboard
inline operator fun <K, V> Map<out K, V>.get(key: K): V?
inline operator fun <K, V> Map<out K, V>.get(key: K): V?
inline operator fun <K, V> Map<out K, V>.get(key: K): V?
inline operator fun <K, V> Map<out K, V>.get(key: K): V?

Returns the value corresponding to the given key, or null if such a key is not present in the map.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.getOrDefault(key: K, defaultValue: V): V
inline fun <K, V> Map<out K, V>.getOrDefault(key: K, defaultValue: V): V
inline fun <K, V> Map<out K, V>.getOrDefault(key: K, defaultValue: V): V
inline fun <K, V> Map<out K, V>.getOrDefault(key: K, defaultValue: V): V

Returns the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key.

Link copied to clipboard
inline fun <K, V> Map<K, V>.getOrElse(key: K, defaultValue: () -> V): V
inline fun <K, V> Map<K, V>.getOrElse(key: K, defaultValue: () -> V): V
inline fun <K, V> Map<K, V>.getOrElse(key: K, defaultValue: () -> V): V
inline fun <K, V> Map<K, V>.getOrElse(key: K, defaultValue: () -> V): V

Returns the value for the given key, or the result of the defaultValue function if there was no entry for the given key.

Link copied to clipboard
inline fun <K, V> MutableMap<K, V>.getOrPut(key: K, defaultValue: () -> V): V
inline fun <K, V> MutableMap<K, V>.getOrPut(key: K, defaultValue: () -> V): V
inline fun <K, V> MutableMap<K, V>.getOrPut(key: K, defaultValue: () -> V): V
inline fun <K, V> MutableMap<K, V>.getOrPut(key: K, defaultValue: () -> V): V

Returns the value for the given key. If the key is not found in the map, calls the defaultValue function, puts its result into the map under the given key and returns it.

Link copied to clipboard
@JvmName(name = "getVar")
inline operator fun <V, V1 : V> MutableMap<in String, out V>.getValue(thisRef: Any?, property: KProperty<*>): V1
@JvmName(name = "getVar")
inline operator fun <V, V1 : V> MutableMap<in String, out V>.getValue(thisRef: Any?, property: KProperty<*>): V1
@JvmName(name = "getVar")
inline operator fun <V, V1 : V> MutableMap<in String, out V>.getValue(thisRef: Any?, property: KProperty<*>): V1
@JvmName(name = "getVar")
inline operator fun <V, V1 : V> MutableMap<in String, out V>.getValue(thisRef: Any?, property: KProperty<*>): V1

Returns the value of the property for the given object from this mutable map.

inline operator fun <V, V1 : V> Map<in String, V>.getValue(thisRef: Any?, property: KProperty<*>): V1
inline operator fun <V, V1 : V> Map<in String, V>.getValue(thisRef: Any?, property: KProperty<*>): V1
inline operator fun <V, V1 : V> Map<in String, V>.getValue(thisRef: Any?, property: KProperty<*>): V1
inline operator fun <V, V1 : V> Map<in String, V>.getValue(thisRef: Any?, property: KProperty<*>): V1

Returns the value of the property for the given object from this read-only map.

fun <K, V> Map<K, V>.getValue(key: K): V
fun <K, V> Map<K, V>.getValue(key: K): V
fun <K, V> Map<K, V>.getValue(key: K): V
fun <K, V> Map<K, V>.getValue(key: K): V

Returns the value for the given key or throws an exception if there is no such key in the map.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.isNotEmpty(): Boolean
inline fun <K, V> Map<out K, V>.isNotEmpty(): Boolean
inline fun <K, V> Map<out K, V>.isNotEmpty(): Boolean
inline fun <K, V> Map<out K, V>.isNotEmpty(): Boolean

Returns true if this map is not empty.

Link copied to clipboard
inline fun <K, V> Map<out K, V>?.isNullOrEmpty(): Boolean
inline fun <K, V> Map<out K, V>?.isNullOrEmpty(): Boolean
inline fun <K, V> Map<out K, V>?.isNullOrEmpty(): Boolean
inline fun <K, V> Map<out K, V>?.isNullOrEmpty(): Boolean

Returns true if this nullable map is either null or empty.

Link copied to clipboard
@JvmName(name = "mutableIterator")
inline operator fun <K, V> MutableMap<K, V>.iterator(): MutableIterator<MutableMap.MutableEntry<K, V>>
@JvmName(name = "mutableIterator")
inline operator fun <K, V> MutableMap<K, V>.iterator(): MutableIterator<MutableMap.MutableEntry<K, V>>
@JvmName(name = "mutableIterator")
inline operator fun <K, V> MutableMap<K, V>.iterator(): MutableIterator<MutableMap.MutableEntry<K, V>>
@JvmName(name = "mutableIterator")
inline operator fun <K, V> MutableMap<K, V>.iterator(): MutableIterator<MutableMap.MutableEntry<K, V>>

Returns a MutableIterator over the mutable entries in the MutableMap.

inline operator fun <K, V> Map<out K, V>.iterator(): Iterator<Map.Entry<K, V>>
inline operator fun <K, V> Map<out K, V>.iterator(): Iterator<Map.Entry<K, V>>
inline operator fun <K, V> Map<out K, V>.iterator(): Iterator<Map.Entry<K, V>>
inline operator fun <K, V> Map<out K, V>.iterator(): Iterator<Map.Entry<K, V>>

Returns an Iterator over the entries in the Map.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.map(transform: (Map.Entry<K, V>) -> R): List<R>
inline fun <K, V, R> Map<out K, V>.map(transform: (Map.Entry<K, V>) -> R): List<R>
inline fun <K, V, R> Map<out K, V>.map(transform: (Map.Entry<K, V>) -> R): List<R>
inline fun <K, V, R> Map<out K, V>.map(transform: (Map.Entry<K, V>) -> R): List<R>

Returns a list containing the results of applying the given transform function to each entry in the original map.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.mapKeys(transform: (Map.Entry<K, V>) -> R): Map<R, V>
inline fun <K, V, R> Map<out K, V>.mapKeys(transform: (Map.Entry<K, V>) -> R): Map<R, V>
inline fun <K, V, R> Map<out K, V>.mapKeys(transform: (Map.Entry<K, V>) -> R): Map<R, V>
inline fun <K, V, R> Map<out K, V>.mapKeys(transform: (Map.Entry<K, V>) -> R): Map<R, V>

Returns a new Map with entries having the keys obtained by applying the transform function to each entry in this Map and the values of this map.

Link copied to clipboard
inline fun <K, V, R, M : MutableMap<in R, in V>> Map<out K, V>.mapKeysTo(destination: M, transform: (Map.Entry<K, V>) -> R): M
inline fun <K, V, R, M : MutableMap<in R, in V>> Map<out K, V>.mapKeysTo(destination: M, transform: (Map.Entry<K, V>) -> R): M
inline fun <K, V, R, M : MutableMap<in R, in V>> Map<out K, V>.mapKeysTo(destination: M, transform: (Map.Entry<K, V>) -> R): M
inline fun <K, V, R, M : MutableMap<in R, in V>> Map<out K, V>.mapKeysTo(destination: M, transform: (Map.Entry<K, V>) -> R): M

Populates the given destination map with entries having the keys obtained by applying the transform function to each entry in this Map and the values of this map.

Link copied to clipboard
inline fun <K, V, R : Any> Map<out K, V>.mapNotNull(transform: (Map.Entry<K, V>) -> R?): List<R>
inline fun <K, V, R : Any> Map<out K, V>.mapNotNull(transform: (Map.Entry<K, V>) -> R?): List<R>
inline fun <K, V, R : Any> Map<out K, V>.mapNotNull(transform: (Map.Entry<K, V>) -> R?): List<R>
inline fun <K, V, R : Any> Map<out K, V>.mapNotNull(transform: (Map.Entry<K, V>) -> R?): List<R>

Returns a list containing only the non-null results of applying the given transform function to each entry in the original map.

Link copied to clipboard
inline fun <K, V, R : Any, C : MutableCollection<in R>> Map<out K, V>.mapNotNullTo(destination: C, transform: (Map.Entry<K, V>) -> R?): C
inline fun <K, V, R : Any, C : MutableCollection<in R>> Map<out K, V>.mapNotNullTo(destination: C, transform: (Map.Entry<K, V>) -> R?): C
inline fun <K, V, R : Any, C : MutableCollection<in R>> Map<out K, V>.mapNotNullTo(destination: C, transform: (Map.Entry<K, V>) -> R?): C
inline fun <K, V, R : Any, C : MutableCollection<in R>> Map<out K, V>.mapNotNullTo(destination: C, transform: (Map.Entry<K, V>) -> R?): C

Applies the given transform function to each entry in the original map and appends only the non-null results to the given destination.

Link copied to clipboard
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.mapTo(destination: C, transform: (Map.Entry<K, V>) -> R): C
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.mapTo(destination: C, transform: (Map.Entry<K, V>) -> R): C
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.mapTo(destination: C, transform: (Map.Entry<K, V>) -> R): C
inline fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.mapTo(destination: C, transform: (Map.Entry<K, V>) -> R): C

Applies the given transform function to each entry of the original map and appends the results to the given destination.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.mapValues(transform: (Map.Entry<K, V>) -> R): Map<K, R>
inline fun <K, V, R> Map<out K, V>.mapValues(transform: (Map.Entry<K, V>) -> R): Map<K, R>
inline fun <K, V, R> Map<out K, V>.mapValues(transform: (Map.Entry<K, V>) -> R): Map<K, R>
inline fun <K, V, R> Map<out K, V>.mapValues(transform: (Map.Entry<K, V>) -> R): Map<K, R>

Returns a new map with entries having the keys of this map and the values obtained by applying the transform function to each entry in this Map.

Link copied to clipboard
inline fun <K, V, R, M : MutableMap<in K, in R>> Map<out K, V>.mapValuesTo(destination: M, transform: (Map.Entry<K, V>) -> R): M
inline fun <K, V, R, M : MutableMap<in K, in R>> Map<out K, V>.mapValuesTo(destination: M, transform: (Map.Entry<K, V>) -> R): M
inline fun <K, V, R, M : MutableMap<in K, in R>> Map<out K, V>.mapValuesTo(destination: M, transform: (Map.Entry<K, V>) -> R): M
inline fun <K, V, R, M : MutableMap<in K, in R>> Map<out K, V>.mapValuesTo(destination: M, transform: (Map.Entry<K, V>) -> R): M

Populates the given destination map with entries having the keys of this map and the values obtained by applying the transform function to each entry in this Map.

Link copied to clipboard
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
Link copied to clipboard
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?

Returns the first entry yielding the largest value of the given function or null if there are no entries.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOf(selector: (Map.Entry<K, V>) -> R): R

Returns the largest value among all values produced by selector function applied to each entry in the map.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxOfOrNull(selector: (Map.Entry<K, V>) -> R): R?

Returns the largest value among all values produced by selector function applied to each entry in the map or null if there are no entries.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.maxOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V, R> Map<out K, V>.maxOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V, R> Map<out K, V>.maxOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V, R> Map<out K, V>.maxOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R

Returns the largest value according to the provided comparator among all values produced by selector function applied to each entry in the map.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.maxOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V, R> Map<out K, V>.maxOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V, R> Map<out K, V>.maxOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V, R> Map<out K, V>.maxOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?

Returns the largest value according to the provided comparator among all values produced by selector function applied to each entry in the map or null if there are no entries.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.maxWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.maxWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.maxWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.maxWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
Link copied to clipboard
inline fun <K, V> Map<out K, V>.maxWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.maxWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.maxWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.maxWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?

Returns the first entry having the largest value according to the provided comparator or null if there are no entries.

Link copied to clipboard
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
Link copied to clipboard
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minByOrNull(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?

Returns the first entry yielding the smallest value of the given function or null if there are no entries.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Double): Double
inline fun <K, V> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> Float): Float
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOf(selector: (Map.Entry<K, V>) -> R): R

Returns the smallest value among all values produced by selector function applied to each entry in the map.

Link copied to clipboard
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Double): Double?
inline fun <K, V> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> Float): Float?
inline fun <K, V, R : Comparable<R>> Map<out K, V>.minOfOrNull(selector: (Map.Entry<K, V>) -> R): R?

Returns the smallest value among all values produced by selector function applied to each entry in the map or null if there are no entries.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.minOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V, R> Map<out K, V>.minOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V, R> Map<out K, V>.minOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R
inline fun <K, V, R> Map<out K, V>.minOfWith(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R

Returns the smallest value according to the provided comparator among all values produced by selector function applied to each entry in the map.

Link copied to clipboard
inline fun <K, V, R> Map<out K, V>.minOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V, R> Map<out K, V>.minOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V, R> Map<out K, V>.minOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?
inline fun <K, V, R> Map<out K, V>.minOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?

Returns the smallest value according to the provided comparator among all values produced by selector function applied to each entry in the map or null if there are no entries.

Link copied to clipboard
operator fun <K, V> Map<out K, V>.minus(key: K): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(key: K): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(key: K): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(key: K): Map<K, V>

Returns a map containing all entries of the original map except the entry with the given key.

operator fun <K, V> Map<out K, V>.minus(keys: Iterable<K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Iterable<K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Iterable<K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Iterable<K>): Map<K, V>

Returns a map containing all entries of the original map except those entries the keys of which are contained in the given keys collection.

operator fun <K, V> Map<out K, V>.minus(keys: Array<out K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Array<out K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Array<out K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Array<out K>): Map<K, V>

Returns a map containing all entries of the original map except those entries the keys of which are contained in the given keys array.

operator fun <K, V> Map<out K, V>.minus(keys: Sequence<K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Sequence<K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Sequence<K>): Map<K, V>
operator fun <K, V> Map<out K, V>.minus(keys: Sequence<K>): Map<K, V>

Returns a map containing all entries of the original map except those entries the keys of which are contained in the given keys sequence.

Link copied to clipboard
inline operator fun <K, V> MutableMap<K, V>.minusAssign(key: K)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(key: K)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(key: K)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(key: K)

Removes the entry with the given key from this mutable map.

inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Iterable<K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Iterable<K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Iterable<K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Iterable<K>)

Removes all entries the keys of which are contained in the given keys collection from this mutable map.

inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Array<out K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Array<out K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Array<out K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Array<out K>)

Removes all entries the keys of which are contained in the given keys array from this mutable map.

inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Sequence<K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Sequence<K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Sequence<K>)
inline operator fun <K, V> MutableMap<K, V>.minusAssign(keys: Sequence<K>)

Removes all entries from the keys of which are contained in the given keys sequence from this mutable map.

Link copied to clipboard
fun <K, V> Map<out K, V>.minWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
fun <K, V> Map<out K, V>.minWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
fun <K, V> Map<out K, V>.minWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
fun <K, V> Map<out K, V>.minWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
Link copied to clipboard
inline fun <K, V> Map<out K, V>.minWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.minWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.minWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?
inline fun <K, V> Map<out K, V>.minWithOrNull(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?

Returns the first entry having the smallest value according to the provided comparator or null if there are no entries.

Link copied to clipboard
fun <K, V> Map<out K, V>.none(): Boolean
fun <K, V> Map<out K, V>.none(): Boolean
fun <K, V> Map<out K, V>.none(): Boolean
fun <K, V> Map<out K, V>.none(): Boolean

Returns true if the map has no entries.

inline fun <K, V> Map<out K, V>.none(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.none(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.none(predicate: (Map.Entry<K, V>) -> Boolean): Boolean
inline fun <K, V> Map<out K, V>.none(predicate: (Map.Entry<K, V>) -> Boolean): Boolean

Returns true if no entries match the given predicate.

Link copied to clipboard
inline fun <K, V> Map<K, V>?.orEmpty(): Map<K, V>
inline fun <K, V> Map<K, V>?.orEmpty(): Map<K, V>
inline fun <K, V> Map<K, V>?.orEmpty(): Map<K, V>
inline fun <K, V> Map<K, V>?.orEmpty(): Map<K, V>

Returns the Map if its not null, or the empty Map otherwise.

Link copied to clipboard
operator fun <K, V> Map<out K, V>.plus(pair: Pair<K, V>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pair: Pair<K, V>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pair: Pair<K, V>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pair: Pair<K, V>): Map<K, V>

Creates a new read-only map by replacing or adding an entry to this map from a given key-value pair.

operator fun <K, V> Map<out K, V>.plus(pairs: Iterable<Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Iterable<Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Iterable<Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Iterable<Pair<K, V>>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from a given collection of key-value pairs.

operator fun <K, V> Map<out K, V>.plus(pairs: Array<out Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Array<out Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Array<out Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Array<out Pair<K, V>>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from a given array of key-value pairs.

operator fun <K, V> Map<out K, V>.plus(pairs: Sequence<Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Sequence<Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Sequence<Pair<K, V>>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(pairs: Sequence<Pair<K, V>>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from a given sequence of key-value pairs.

operator fun <K, V> Map<out K, V>.plus(map: Map<out K, V>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(map: Map<out K, V>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(map: Map<out K, V>): Map<K, V>
operator fun <K, V> Map<out K, V>.plus(map: Map<out K, V>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from another map.

Link copied to clipboard
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pair: Pair<K, V>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pair: Pair<K, V>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pair: Pair<K, V>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pair: Pair<K, V>)

Appends or replaces the given pair in this mutable map.

inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Iterable<Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Iterable<Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Iterable<Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Iterable<Pair<K, V>>)

Appends or replaces all pairs from the given collection of pairs in this mutable map.

inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Array<out Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Array<out Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Array<out Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Array<out Pair<K, V>>)

Appends or replaces all pairs from the given array of pairs in this mutable map.

inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Sequence<Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Sequence<Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Sequence<Pair<K, V>>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(pairs: Sequence<Pair<K, V>>)

Appends or replaces all pairs from the given sequence of pairs in this mutable map.

inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(map: Map<K, V>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(map: Map<K, V>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(map: Map<K, V>)
inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(map: Map<K, V>)

Appends or replaces all entries from the given map in this mutable map.

Link copied to clipboard
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Array<out Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Array<out Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Array<out Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Array<out Pair<K, V>>)

Puts all the given pairs into this MutableMap with the first component in the pair being the key and the second the value.

fun <K, V> MutableMap<in K, in V>.putAll(pairs: Iterable<Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Iterable<Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Iterable<Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Iterable<Pair<K, V>>)

Puts all the elements of the given collection into this MutableMap with the first component in the pair being the key and the second the value.

fun <K, V> MutableMap<in K, in V>.putAll(pairs: Sequence<Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Sequence<Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Sequence<Pair<K, V>>)
fun <K, V> MutableMap<in K, in V>.putAll(pairs: Sequence<Pair<K, V>>)

Puts all the elements of the given sequence into this MutableMap with the first component in the pair being the key and the second the value.

Link copied to clipboard
inline fun <K, V> MutableMap<out K, V>.remove(key: K): V?
inline fun <K, V> MutableMap<out K, V>.remove(key: K): V?
inline fun <K, V> MutableMap<out K, V>.remove(key: K): V?
inline fun <K, V> MutableMap<out K, V>.remove(key: K): V?

Removes the specified key and its corresponding value from this map.

inline fun <K, V> MutableMap<out K, out V>.remove(key: K, value: V): Boolean
inline fun <K, V> MutableMap<out K, out V>.remove(key: K, value: V): Boolean
inline fun <K, V> MutableMap<out K, out V>.remove(key: K, value: V): Boolean
inline fun <K, V> MutableMap<out K, out V>.remove(key: K, value: V): Boolean

Removes the entry for the specified key only if it is currently mapped to the specified value.

Link copied to clipboard
inline operator fun <K, V> MutableMap<K, V>.set(key: K, value: V)
inline operator fun <K, V> MutableMap<K, V>.set(key: K, value: V)
inline operator fun <K, V> MutableMap<K, V>.set(key: K, value: V)
inline operator fun <K, V> MutableMap<K, V>.set(key: K, value: V)

Allows to use the index operator for storing values in a mutable map.

Link copied to clipboard
inline operator fun <V> MutableMap<in String, in V>.setValue(    thisRef: Any?,     property: KProperty<*>,     value: V)
inline operator fun <V> MutableMap<in String, in V>.setValue(    thisRef: Any?,     property: KProperty<*>,     value: V)
inline operator fun <V> MutableMap<in String, in V>.setValue(    thisRef: Any?,     property: KProperty<*>,     value: V)
inline operator fun <V> MutableMap<in String, in V>.setValue(    thisRef: Any?,     property: KProperty<*>,     value: V)

Stores the value of the property for the given object in this mutable map.

Link copied to clipboard
fun <K, V> Map<out K, V>.toList(): List<Pair<K, V>>
fun <K, V> Map<out K, V>.toList(): List<Pair<K, V>>
fun <K, V> Map<out K, V>.toList(): List<Pair<K, V>>
fun <K, V> Map<out K, V>.toList(): List<Pair<K, V>>

Returns a List containing all key-value pairs.

Link copied to clipboard
fun <K, V> Map<out K, V>.toMap(): Map<K, V>
fun <K, V> Map<out K, V>.toMap(): Map<K, V>
fun <K, V> Map<out K, V>.toMap(): Map<K, V>
fun <K, V> Map<out K, V>.toMap(): Map<K, V>

Returns a new read-only map containing all key-value pairs from the original map.

fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.toMap(destination: M): M
fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.toMap(destination: M): M
fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.toMap(destination: M): M
fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.toMap(destination: M): M

Populates and returns the destination mutable map with key-value pairs from the given map.

Link copied to clipboard
fun <K, V> Map<out K, V>.toMutableMap(): MutableMap<K, V>
fun <K, V> Map<out K, V>.toMutableMap(): MutableMap<K, V>
fun <K, V> Map<out K, V>.toMutableMap(): MutableMap<K, V>
fun <K, V> Map<out K, V>.toMutableMap(): MutableMap<K, V>

Returns a new mutable map containing all key-value pairs from the original map.

Link copied to clipboard

Converts this Map to a Properties object.

Link copied to clipboard
fun <K : Comparable<K>, V> Map<out K, V>.toSortedMap(): SortedMap<K, V>
fun <K : Comparable<K>, V> Map<out K, V>.toSortedMap(): SortedMap<K, V>
fun <K : Comparable<K>, V> Map<out K, V>.toSortedMap(): SortedMap<K, V>
fun <K : Comparable<K>, V> Map<out K, V>.toSortedMap(): SortedMap<K, V>

Converts this Map to a SortedMap. The resulting SortedMap determines the equality and order of keys according to their natural sorting order.

fun <K, V> Map<out K, V>.toSortedMap(comparator: Comparator<in K>): SortedMap<K, V>
fun <K, V> Map<out K, V>.toSortedMap(comparator: Comparator<in K>): SortedMap<K, V>
fun <K, V> Map<out K, V>.toSortedMap(comparator: Comparator<in K>): SortedMap<K, V>
fun <K, V> Map<out K, V>.toSortedMap(comparator: Comparator<in K>): SortedMap<K, V>

Converts this Map to a SortedMap. The resulting SortedMap determines the equality and order of keys according to the sorting order provided by the given comparator.

Link copied to clipboard
@JvmName(name = "withDefaultMutable")
fun <K, V> MutableMap<K, V>.withDefault(defaultValue: (key: K) -> V): MutableMap<K, V>
@JvmName(name = "withDefaultMutable")
fun <K, V> MutableMap<K, V>.withDefault(defaultValue: (key: K) -> V): MutableMap<K, V>
@JvmName(name = "withDefaultMutable")
fun <K, V> MutableMap<K, V>.withDefault(defaultValue: (key: K) -> V): MutableMap<K, V>
@JvmName(name = "withDefaultMutable")
fun <K, V> MutableMap<K, V>.withDefault(defaultValue: (key: K) -> V): MutableMap<K, V>

Returns a wrapper of this mutable map, having the implicit default value provided with the specified function defaultValue.

fun <K, V> Map<K, V>.withDefault(defaultValue: (key: K) -> V): Map<K, V>
fun <K, V> Map<K, V>.withDefault(defaultValue: (key: K) -> V): Map<K, V>
fun <K, V> Map<K, V>.withDefault(defaultValue: (key: K) -> V): Map<K, V>
fun <K, V> Map<K, V>.withDefault(defaultValue: (key: K) -> V): Map<K, V>

Returns a wrapper of this read-only map, having the implicit default value provided with the specified function defaultValue.