Sprache

SparseArray.Compute(Int32, IIntObjFunction) 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", "(ILandroid/util/function/IntObjFunction;)Ljava/lang/Object;", "GetCompute_ILandroid_util_function_IntObjFunction_Handler", ApiSince=37)]
public virtual Java.Lang.Object? Compute(int key, Android.Util.Function.IIntObjFunction function);
[<Android.Runtime.Register("compute", "(ILandroid/util/function/IntObjFunction;)Ljava/lang/Object;", "GetCompute_ILandroid_util_function_IntObjFunction_Handler", ApiSince=37)>]
abstract member Compute : int * Android.Util.Function.IIntObjFunction -> Java.Lang.Object
override this.Compute : int * Android.Util.Function.IIntObjFunction -> Java.Lang.Object

Parameters

key
Int32

The key to compute the value for.

function
IIntObjFunction

The function to compute the new value.

Returns

The new mapped value, or null if none.

Attributes

Applies to