Partager via


SparseArray.Put(Int32, Object) Method

Definition

Adds a mapping from the specified key to the specified value, replacing the previous mapping from the specified key if there was one.

[Android.Runtime.Register("put", "(ILjava/lang/Object;)V", "GetPut_ILjava_lang_Object_Handler")]
public virtual void Put (int key, Java.Lang.Object? value);
[<Android.Runtime.Register("put", "(ILjava/lang/Object;)V", "GetPut_ILjava_lang_Object_Handler")>]
abstract member Put : int * Java.Lang.Object -> unit
override this.Put : int * Java.Lang.Object -> unit

Parameters

key
Int32
value
Object
Attributes

Remarks

Adds a mapping from the specified key to the specified value, replacing the previous mapping from the specified key if there was one.

Java documentation for android.util.SparseArray.put(int, E).

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