ConcurrentHashMap.Contains(Object) Method

Definition

Tests if some key maps into the specified value in this table.

[Android.Runtime.Register("contains", "(Ljava/lang/Object;)Z", "GetContains_Ljava_lang_Object_Handler")]
public virtual bool Contains (Java.Lang.Object value);
[<Android.Runtime.Register("contains", "(Ljava/lang/Object;)Z", "GetContains_Ljava_lang_Object_Handler")>]
abstract member Contains : Java.Lang.Object -> bool
override this.Contains : Java.Lang.Object -> bool

Parameters

value
Object

a value to search for

Returns

true if and only if some key maps to the value argument in this table as determined by the equals method; false otherwise

Attributes

Exceptions

if the specified value is null

Remarks

Tests if some key maps into the specified value in this table.

Note that this method is identical in functionality to #containsValue(Object), and exists solely to ensure full compatibility with class java.util.Hashtable, which supported this method prior to introduction of the Java Collections Framework.

Java documentation for java.util.concurrent.ConcurrentHashMap.contains(java.lang.Object).

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