remove

fun remove(key: K): V?

Removes the mapping for the specified key from the map, if it exists. Notifies observers if the key had an associated value before removal.

Return

the previous value associated with the key, or null if the key was not present in the map.

Parameters

key

The key whose mapping is to be removed from the map.