ConcurrentHashMap.Merge(Object, Object, IBiFunction) Method

Definition

If the specified key is not already associated with a (non-null) value, associates it with the given value.

[Android.Runtime.Register("merge", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "GetMerge_Ljava_lang_Object_Ljava_lang_Object_Ljava_util_function_BiFunction_Handler", ApiSince=24)]
public virtual Java.Lang.Object? Merge (Java.Lang.Object key, Java.Lang.Object value, Java.Util.Functions.IBiFunction remappingFunction);
[<Android.Runtime.Register("merge", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "GetMerge_Ljava_lang_Object_Ljava_lang_Object_Ljava_util_function_BiFunction_Handler", ApiSince=24)>]
abstract member Merge : Java.Lang.Object * Java.Lang.Object * Java.Util.Functions.IBiFunction -> Java.Lang.Object
override this.Merge : Java.Lang.Object * Java.Lang.Object * Java.Util.Functions.IBiFunction -> Java.Lang.Object

Parameters

key
Object

key with which the specified value is to be associated

value
Object

the value to use if absent

remappingFunction
IBiFunction

the function to recompute a value if present

Returns

Object

the new value associated with the specified key, or null if none

Implements

Java.Util.Concurrent.IConcurrentMap.Java
Attributes

Remarks

Java documentation for java.util.concurrent.ConcurrentHashMap.merge(K, V, java.util.function.BiFunction<? super V, ? super V, ? extends 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