Udostępnij za pośrednictwem


Optional.Of(Object) Method

Definition

Returns an Optional describing the given non-null value.

[Android.Runtime.Register("of", "(Ljava/lang/Object;)Ljava/util/Optional;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.Optional? Of (Java.Lang.Object? value);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;)Ljava/util/Optional;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Of : Java.Lang.Object -> Java.Util.Optional

Parameters

value
Object

the value to describe, which must be non-null

Returns

an Optional with the value present

Attributes

Remarks

Returns an Optional describing the given non-null value.

Java documentation for java.util.Optional.of(T).

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