OptionalInt.OrElseGet(IIntSupplier) Method

Definition

If a value is present, returns the value, otherwise returns the result produced by the supplying function.

[Android.Runtime.Register("orElseGet", "(Ljava/util/function/IntSupplier;)I", "", ApiSince=24)]
public int OrElseGet (Java.Util.Functions.IIntSupplier? supplier);
[<Android.Runtime.Register("orElseGet", "(Ljava/util/function/IntSupplier;)I", "", ApiSince=24)>]
member this.OrElseGet : Java.Util.Functions.IIntSupplier -> int

Parameters

supplier
IIntSupplier

the supplying function that produces a value to be returned

Returns

the value, if present, otherwise the result produced by the supplying function

Attributes

Remarks

Java documentation for java.util.OptionalInt.orElseGet(java.util.function.IntSupplier).

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.

Applies to