remove

actual open override fun remove(key: K): V?
actual fun remove(key: K, value: V): Boolean
expect open override fun remove(key: K): V?

Removes the mapping for a key from this map if it is present.

Return

the previous value associated with the key, or null if there was no mapping

Parameters

key

the key whose mapping is to be removed


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

Atomically removes the entry for a key only if currently mapped to the specified value.

Return

true if the value was removed

Parameters

key

the key whose mapping is to be removed

value

the value expected to be associated with the key

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