Language

SparseLongArray.Get Method

Definition

Overloads

Name Description
Get(Int32)

Gets the long mapped from the specified key, or 0 if no such mapping has been made.

Get(Int32, Int64)

Gets the long mapped from the specified key, or the specified value if no such mapping has been made.

Get(Int32)

Gets the long mapped from the specified key, or 0 if no such mapping has been made.

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

Parameters

key
Int32

The integer key to look up.

Returns

The value mapped to key, or 0 if the key is absent.

Attributes

Remarks

Gets the long mapped from the specified key, or 0 if no such mapping has been made.

Java documentation for android.util.SparseLongArray.get(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

Get(Int32, Int64)

Gets the long mapped from the specified key, or the specified value if no such mapping has been made.

[Android.Runtime.Register("get", "(IJ)J", "GetGet_IJHandler")]
public virtual long Get(int key, long valueIfKeyNotFound);
[<Android.Runtime.Register("get", "(IJ)J", "GetGet_IJHandler")>]
abstract member Get : int * int64 -> int64
override this.Get : int * int64 -> int64

Parameters

key
Int32

The integer key to look up.

valueIfKeyNotFound
Int64

The value to return when the key has no mapping.

Returns

The mapped value, or valueIfKeyNotFound if the key is absent.

Attributes

Remarks

Gets the long mapped from the specified key, or the specified value if no such mapping has been made.

Java documentation for android.util.SparseLongArray.get(int, 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