Optional.IfPresent(IConsumer) Metodo

Definizione

Se è presente un valore, esegue l'azione specificata con il valore , altrimenti non esegue alcuna operazione.

[Android.Runtime.Register("ifPresent", "(Ljava/util/function/Consumer;)V", "", ApiSince=24)]
public void IfPresent(Java.Util.Functions.IConsumer? action);
[<Android.Runtime.Register("ifPresent", "(Ljava/util/function/Consumer;)V", "", ApiSince=24)>]
member this.IfPresent : Java.Util.Functions.IConsumer -> unit

Parametri

action
IConsumer

azione da eseguire, se è presente un valore

Attributi

Commenti

Se è presente un valore, esegue l'azione specificata con il valore , altrimenti non esegue alcuna operazione.

per java.util.Optional.ifPresent(java.util.function.Consumer<? super T>).

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