Language

Properties.Compute(Object, IBiFunction) Method

Definition

Computes a value for a key from its current mapping, if any.

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

Parameters

key
Object

The non-null key whose mapping is to be computed.

remappingFunction
IBiFunction

The non-null function called with the key and its current value, or null when absent.

Returns

The computed value, or null if no mapping remains.

Attributes

Remarks

A null function result removes an existing entry or leaves an absent key unmapped. The function must not modify this map during computation. This operation uses this object's entries, not its default property list.

Applies to