Android.Util.SparseIntArray Members

The members of Android.Util.SparseIntArray are listed below.

See Also: Inherited members from Java.Lang.Object

Public Constructors

Creates a new SparseIntArray containing no mappings.
Creates a new SparseIntArray containing no mappings that will not require any additional memory allocation to store the specified number of mappings.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Append(int, int)
Puts a key/value pair into the array, optimizing for the case where the key is greater than all existing keys in the array.
Clear()
Removes all key-value mappings from this SparseIntArray.
Clone() : SparseIntArray
Creates and returns a copy of this Object.
Delete(int)
Removes the mapping from the specified key, if there was any.
Get(int) : int
Gets the int mapped from the specified key, or 0 if no such mapping has been made.
Get(int, int) : int
Gets the int mapped from the specified key, or the specified value if no such mapping has been made.
IndexOfKey(int) : int
Returns the index for which SparseIntArray.KeyAt(int) would return the specified key, or a negative number if the specified key is not mapped.
IndexOfValue(int) : int
Returns an index for which SparseIntArray.ValueAt(int) would return the specified key, or a negative number if no keys map to the specified value.
KeyAt(int) : int
Given an index in the range 0...size()-1, returns the key from the indexth key-value mapping that this SparseIntArray stores.
Put(int, int)
Adds a mapping from the specified key to the specified value, replacing the previous mapping from the specified key if there was one.
RemoveAt(int)
Removes the mapping at the given index.
Size() : int
Returns the number of key-value mappings that this SparseIntArray currently stores.
ValueAt(int) : int
Given an index in the range 0...size()-1, returns the value from the indexth key-value mapping that this SparseIntArray stores.