IMap.ContainsKey(Object) Method

Definition

Returns true if this map contains a mapping for the specified key.

[Android.Runtime.Register("containsKey", "(Ljava/lang/Object;)Z", "GetContainsKey_Ljava_lang_Object_Handler:Java.Util.IMapInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool ContainsKey (Java.Lang.Object? key);
[<Android.Runtime.Register("containsKey", "(Ljava/lang/Object;)Z", "GetContainsKey_Ljava_lang_Object_Handler:Java.Util.IMapInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ContainsKey : Java.Lang.Object -> bool

Parameters

key
Object

key whose presence in this map is to be tested

Returns

true if this map contains a mapping for the specified key

Attributes

Remarks

Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains a mapping for a key k such that Objects.equals(key, k). (There can be at most one such mapping.)

Java documentation for java.util.Map.containsKey(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