remove

fun remove(key: K): V?

Remove the specified key and any value associated with it. If the key is present, and the softly held corresponding value has not been reclaimed by the garbage collector, then perform the retirement action, if any.

Return

The value associated with the key, or null if the key is not present or if the value has already been reclaimed.

Parameters

key

A key.