MutableMapBase

abstract class MutableMapBase<K, V, MT : MapType<K, V, MT, MMT>, MMT : MutableMapType<K, V, MT, MMT>>(val map: MutableMap<K, V>) : MutableMapType<K, V, MT, MMT> (source)

Inheritors

Constructors

Link copied to clipboard
constructor(map: MutableMap<K, V>)

Properties

Link copied to clipboard

Returns a read-only Set of all key/value pairs in this map.

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

Returns a read-only Collection of all values in this map. Note that this collection may contain duplicate values.

Link copied to clipboard
val map: MutableMap<K, V>

The MutableMap to create the MutableMapBase from

Link copied to clipboard
open override val size: Int

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

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

Returns a read-only Collection of all values in this map. Note that this collection may contain duplicate values.

Functions

Link copied to clipboard
open override fun clear()

Removes all elements from this map.

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

Returns true if the map contains the specified key.

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

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

Link copied to clipboard
open operator override 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.

Link copied to clipboard
open override fun isEmpty(): Boolean

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

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

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

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

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

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

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

Link copied to clipboard
abstract fun toMap(): MT

Create a new map from this map

Link copied to clipboard
abstract fun toMutableMap(): MMT

Create a mutable map from this map