Java.Util.Concurrent.ConcurrentHashMap.Remove Method
Removes the entry for a key only if currently mapped to a given value.

Syntax

[Android.Runtime.Register("remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", "GetRemove_Ljava_lang_Object_Ljava_lang_Object_Handler")]
public virtual bool Remove (Java.Lang.Object key, Java.Lang.Object value)

Parameters

key
key with which the specified value is associated
value
value expected to be associated with the specified key

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.NullPointerExceptionif the specified key is null

Remarks

Removes the entry for a key only if currently mapped to a given value. This is equivalent to

java Example

if (map.containsKey(key) && map.get(key).equals(value)) {
   map.remove(key);
   return true;
  else
   return false;}
except that the action is performed atomically.

[Android Documentation]

Requirements

Namespace: Java.Util.Concurrent
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1