OptionalLong.IfPresentOrElse(ILongConsumer, IRunnable) Metodo

Definizione

Se è presente un valore, esegue l'azione specificata con il valore , in caso contrario esegue l'azione in base vuota specificata.

[Android.Runtime.Register("ifPresentOrElse", "(Ljava/util/function/LongConsumer;Ljava/lang/Runnable;)V", "", ApiSince=33)]
public void IfPresentOrElse(Java.Util.Functions.ILongConsumer? action, Java.Lang.IRunnable? emptyAction);
[<Android.Runtime.Register("ifPresentOrElse", "(Ljava/util/function/LongConsumer;Ljava/lang/Runnable;)V", "", ApiSince=33)>]
member this.IfPresentOrElse : Java.Util.Functions.ILongConsumer * Java.Lang.IRunnable -> unit

Parametri

action
ILongConsumer

azione da eseguire, se è presente un valore

emptyAction
IRunnable

azione in base vuota da eseguire, se non è presente alcun valore

Attributi

Commenti

per java.util.OptionalLong.ifPresentOrElse(java.util.function.LongConsumer, java.lang.Runnable).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.

Si applica a