다음을 통해 공유


OptionalLong.OrElseGet(ILongSupplier) 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/LongSupplier;)J", "", ApiSince=24)]
public long OrElseGet (Java.Util.Functions.ILongSupplier? supplier);
[<Android.Runtime.Register("orElseGet", "(Ljava/util/function/LongSupplier;)J", "", ApiSince=24)>]
member this.OrElseGet : Java.Util.Functions.ILongSupplier -> int64

Parameters

supplier
ILongSupplier

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.OptionalLong.orElseGet(java.util.function.LongSupplier).

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