Language

SparseIntArray.Get Method

Definition

Overloads

Name Description
Get(Int32)

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

Get(Int32, Int32)

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

Get(Int32)

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

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

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 int mapped from the specified key, or 0 if no such mapping has been made.

Java documentation for android.util.SparseIntArray.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, Int32)

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

[Android.Runtime.Register("get", "(II)I", "GetGet_IIHandler")]
public virtual int Get(int key, int valueIfKeyNotFound);
[<Android.Runtime.Register("get", "(II)I", "GetGet_IIHandler")>]
abstract member Get : int * int -> int
override this.Get : int * int -> int

Parameters

key
Int32

The integer key to look up.

valueIfKeyNotFound
Int32

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 int mapped from the specified key, or the specified value if no such mapping has been made.

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