Provider.ComputeIfPresent(Object, IBiFunction) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
If the value for the specified key is present and non-null, attempts to compute a new mapping given the key and its current mapped value.
[Android.Runtime.Register("computeIfPresent", "(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "GetComputeIfPresent_Ljava_lang_Object_Ljava_util_function_BiFunction_Handler", ApiSince=26)]
public override Java.Lang.Object? ComputeIfPresent(Java.Lang.Object? key, Java.Util.Functions.IBiFunction? remappingFunction);
[<Android.Runtime.Register("computeIfPresent", "(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "GetComputeIfPresent_Ljava_lang_Object_Ljava_util_function_BiFunction_Handler", ApiSince=26)>]
override this.ComputeIfPresent : Java.Lang.Object * Java.Util.Functions.IBiFunction -> Java.Lang.Object
Parameters
- key
- Object
the key with which the computed value is to be associated.
- remappingFunction
- IBiFunction
the function used to compute a value.
Returns
the new value associated with the specified key, or null if none.
- Attributes
Remarks
If the value for the specified key is present and non-null, attempts to compute a new mapping given the key and its current mapped value.
If a security manager is enabled, its checkSecurityAccess method is called with the strings "putProviderProperty."+name and "removeProviderProperty."+name, where name is the provider name, to see if it's ok to set this provider's property values and remove this provider's properties.
Added in 1.8.
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.