put

open override fun put(key: K, value: V): V?

Associates the specified value with the specified key in the map. This operation is synchronized.

Return

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

Parameters

key

The key with which the specified value is to be associated.

value

The value to be associated with the specified key.