Language

LongSparseArray.IndexOfKey(Int64) Method

Definition

Returns the index for which #keyAt would return the specified key, or a negative number if the specified key is not mapped.

[Android.Runtime.Register("indexOfKey", "(J)I", "GetIndexOfKey_JHandler")]
public virtual int IndexOfKey(long key);
[<Android.Runtime.Register("indexOfKey", "(J)I", "GetIndexOfKey_JHandler")>]
abstract member IndexOfKey : int64 -> int
override this.IndexOfKey : int64 -> int

Parameters

key
Int64

The 64-bit integer key to search for.

Returns

The zero-based index of the key's mapping, or a negative value if the key is absent.

Attributes

Remarks

Returns the index for which #keyAt would return the specified key, or a negative number if the specified key is not mapped.

Java documentation for android.util.LongSparseArray.indexOfKey(long).

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