Share via


ArrayMap.Put(Object, Object) Method

Definition

Add a new value to the array map.

[Android.Runtime.Register("put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "")]
public Java.Lang.Object? Put (Java.Lang.Object? key, Java.Lang.Object? value);
[<Android.Runtime.Register("put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "")>]
abstract member Put : Java.Lang.Object * Java.Lang.Object -> Java.Lang.Object
override this.Put : Java.Lang.Object * Java.Lang.Object -> Java.Lang.Object

Parameters

key
Object

The key under which to store the value. If this key already exists in the array, its value will be replaced.

value
Object

The value to store for the given key.

Returns

Returns the old value that was stored for the given key, or null if there was no such key.

Implements

Attributes

Remarks

Add a new value to the array map.

Java documentation for android.util.ArrayMap.put(K, V).

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