KtMutableMapExtensions<K, V> extension
Properties
-
dart
→ Map<K, V>
-
Creates a Map instance that wraps the original KtMap. It acts as a view.
no setter
Methods
-
getOrPut(K key, V defaultValue())
→ 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.
-
iterator()
→ KtMutableIterator<KtMutableMapEntry<K, V>>
-
Returns an Iterator over the entries in the Map.
-
putAllPairs(KtIterable<KtPair<K, V>> pairs)
→ void
-
Puts all the given
pairs
into this KtMutableMap with the first component in the pair being the key and the second the value.
-
putIfAbsent(K key, V value)
→ V?
-
If the specified key is not already associated with a value (or is mapped to
null
) associates it with the given value and returns null
, else returns the current value.