Dil

LongSparseArray.Compute(Int64, ILongObjFunction) Method

Definition

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

[Android.Runtime.Register("compute", "(JLandroid/util/function/LongObjFunction;)Ljava/lang/Object;", "GetCompute_JLandroid_util_function_LongObjFunction_Handler", ApiSince=37)]
public virtual Java.Lang.Object? Compute(long key, Android.Util.Function.ILongObjFunction function);
[<Android.Runtime.Register("compute", "(JLandroid/util/function/LongObjFunction;)Ljava/lang/Object;", "GetCompute_JLandroid_util_function_LongObjFunction_Handler", ApiSince=37)>]
abstract member Compute : int64 * Android.Util.Function.ILongObjFunction -> Java.Lang.Object
override this.Compute : int64 * Android.Util.Function.ILongObjFunction -> Java.Lang.Object

Parameters

key
Int64

The key to compute the value for.

function
ILongObjFunction

The function to compute the new value.

Returns

The new mapped value, or null if none.

Attributes

Remarks

Attempts to compute a new mapped value for the specified key based on its current mapping (or null if there is no current mapping). If the function returns null, the mapping is removed (or remains absent if initially absent).

Android reference for android.util.LongSparseArray.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