set

operator fun <K, V> MutableMap<K, V>.set(key: K, value: V)(source)

Associates key with value using indexed assignment, discarding the previous value.

Delegates to MutableMap.put. Use put directly when the previous value is needed.

Receiver

mutable map to update.

Parameters

key

key to insert or update.

value

value to associate with the key.

See also