Language

Attributes.IMap.Remove(Object) Method

Definition

Removes the mapping for a key from this map if it is present (optional operation).

Java.Lang.Object? IMap.Remove(Java.Lang.Object? key);
abstract member Java.Util.IMap.Remove : Java.Lang.Object -> Java.Lang.Object
override this.Java.Util.IMap.Remove : Java.Lang.Object -> Java.Lang.Object

Parameters

key
Object

key whose mapping is to be removed from the map

Returns

the previous value associated with key, or null if there was no mapping for key.

Implements

Remarks

Removes the mapping for a key from this map if it is present (optional operation). More formally, if this map contains a mapping from key k to value v such that Objects.equals(key, k), that mapping is removed. (The map can contain at most one such mapping.) Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key. If this map permits null values, then a return value of null does not necessarily indicate that the map contained no mapping for the key; it's also possible that the map explicitly mapped the key to null. The map will not contain a mapping for the specified key once the call returns.

Java reference for java.util.Map.remove.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to