Hashtable.Put(Object, Object) Method

Definition

Maps the specified key to the specified value in this hashtable.

[Android.Runtime.Register("put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "GetPut_Ljava_lang_Object_Ljava_lang_Object_Handler")]
public override 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;", "GetPut_Ljava_lang_Object_Ljava_lang_Object_Handler")>]
override this.Put : Java.Lang.Object * Java.Lang.Object -> Java.Lang.Object

Parameters

key
Object

the hashtable key

value
Object

the value

Returns

the previous value of the specified key in this hashtable, or null if it did not have one

Implements

Attributes

Remarks

Maps the specified key to the specified value in this hashtable. Neither the key nor the value can be null.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Java documentation for java.util.Hashtable.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