Hashtable.PutIfAbsent(Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified mapping only when the table has no entry for the key.
[Android.Runtime.Register("putIfAbsent", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "GetPutIfAbsent_Ljava_lang_Object_Ljava_lang_Object_Handler", ApiSince=24)]
public virtual Java.Lang.Object? PutIfAbsent(Java.Lang.Object? key, Java.Lang.Object? value);
[<Android.Runtime.Register("putIfAbsent", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "GetPutIfAbsent_Ljava_lang_Object_Ljava_lang_Object_Handler", ApiSince=24)>]
abstract member PutIfAbsent : Java.Lang.Object * Java.Lang.Object -> Java.Lang.Object
override this.PutIfAbsent : Java.Lang.Object * Java.Lang.Object -> Java.Lang.Object
Parameters
- key
- Object
The key for the proposed mapping.
- value
- Object
The non-null value to store if the key is absent.
Returns
The existing value, or null if a new entry was added.
Implements
- Attributes
Remarks
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.