MutableMap
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.
Since Kotlin
1.0Parameters
the type of map keys. The map is invariant in its key type.
the type of map values. The mutable map is invariant in its value type.
the type of map keys. The map is invariant in its key type.
the type of map values. The mutable map is invariant in its value type.
Types
Represents a key/value pair held by a MutableMap.
Represents a key/value pair held by a MutableMap.
Functions
Returns the value corresponding to the given key, or null if such a key is not present in the map.
Returns the value corresponding to the given key, or defaultValue if such a key is not present in the map.
Returns the value corresponding to the given key, or defaultValue if such a key is not present in the map.
Removes the specified key and its corresponding value from this map.
Removes the entry for the specified key only if it is mapped to the specified value.
Properties
Returns a MutableSet of all key/value pairs in this map.
Returns a MutableSet of all key/value pairs in this map.
Returns a MutableSet of all keys in this map.
Returns a MutableSet of all keys in this map.
Returns a MutableCollection of all values in this map. Note that this collection may contain duplicate values.
Returns a MutableCollection of all values in this map. Note that this collection may contain duplicate values.
Extensions
Converts this Map to a Properties object.
Converts this Map to a SortedMap. The resulting SortedMap determines the equality and order of keys according to their natural sorting order.
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.