Dil

SparseLongArray.Compute(Int32, ILongBinaryOperator) Method

Definition

Attempts to compute a new mapped value for the specified key based on its current mapped value (or 0 if there is no current mapping).

[Android.Runtime.Register("compute", "(ILjava/util/function/LongBinaryOperator;)J", "GetCompute_ILjava_util_function_LongBinaryOperator_Handler", ApiSince=37)]
public virtual long Compute(int key, Java.Util.Functions.ILongBinaryOperator function);
[<Android.Runtime.Register("compute", "(ILjava/util/function/LongBinaryOperator;)J", "GetCompute_ILjava_util_function_LongBinaryOperator_Handler", ApiSince=37)>]
abstract member Compute : int * Java.Util.Functions.ILongBinaryOperator -> int64
override this.Compute : int * Java.Util.Functions.ILongBinaryOperator -> int64

Parameters

key
Int32

The key to compute the value for.

function
ILongBinaryOperator

The function to compute the new value.

Returns

The new mapped value.

Attributes

Remarks

Attempts to compute a new mapped value for the specified key based on its current mapped value (or 0 if there is no current mapping).

Android reference for android.util.SparseLongArray.compute.

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