SparseArray.Contains(Int32) Method

Definition

Returns true if the key exists in the array.

[Android.Runtime.Register("contains", "(I)Z", "GetContains_IHandler", ApiSince=30)]
public virtual bool Contains (int key);
[<Android.Runtime.Register("contains", "(I)Z", "GetContains_IHandler", ApiSince=30)>]
abstract member Contains : int -> bool
override this.Contains : int -> bool

Parameters

key
Int32

Potential key in the mapping

Returns

true if the key is defined in the mapping

Attributes

Remarks

Returns true if the key exists in the array. This is equivalent to #indexOfKey(int) >= 0.

Java documentation for android.util.SparseArray.contains(int).

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