Langue

LongSparseArray.Compute(Int64, ILongObjFunction) Méthode

Définition

Tente de calculer une nouvelle valeur mappée pour la clé spécifiée en fonction de son mappage actuel (ou null s’il n’existe aucun mappage actuel).

[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

Paramètres

key
Int64

Clé pour laquelle calculer la valeur.

function
ILongObjFunction

Fonction permettant de calculer la nouvelle valeur.

Retours

Nouvelle valeur mappée ou null si aucune.

Attributs

Remarques

Tente de calculer une nouvelle valeur mappée pour la clé spécifiée en fonction de son mappage actuel (ou null s’il n’existe aucun mappage actuel). Si la fonction retourne null, le mappage est supprimé (ou reste absent s’il est initialement absent).

Référence Android pour android.util.LongSparseArray.compute.

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à