remove

fun <K, V> MutableMap<K, V>.remove(key: K, value: V): Boolean

ported from java.util.Map.remove()

Removes the entry for the specified key only if it is currently mapped to the specified value.

Return

true if the value was removed

Parameters

key

key with which the specified value is associated

value

value expected to be associated with the specified key