Language

IdentityHashMap.Remove(Object, Object) Method

Definition

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

[Android.Runtime.Register("remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", "GetRemove_Ljava_lang_Object_Ljava_lang_Object_Handler", ApiSince=36)]
public virtual bool Remove(Java.Lang.Object? key, Java.Lang.Object? value);
[<Android.Runtime.Register("remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", "GetRemove_Ljava_lang_Object_Ljava_lang_Object_Handler", ApiSince=36)>]
override this.Remove : Java.Lang.Object * Java.Lang.Object -> bool

Parameters

key
Object

key with which the specified value is associated

value
Object

value expected to be associated with the specified key

Returns

true if the value was removed

Implements

Attributes

Remarks

Removes the entry for the specified key only if it is currently mapped to the specified value. The key and value are compared by Java reference identity. If both references match an entry, the method removes it and returns true; otherwise, it returns false.

Java reference for java.util.IdentityHashMap.remove.

Applies to