remove

fun remove(key: K): V?

Removes the entry for key and returns its value if it was still live, or returns null if the key is absent or its entry has expired.

An expired entry is removed but its stale value is not returned.