remove

abstract fun remove(key: K): V?(source)

Removes key from this map and returns the previously-stored value.

If no value was previously stored, null is returned (same behavior as get, but in a single operation).

See also

Equivalent method for regular maps.