Package org.nuxeo.ecm.core.blob
Class BlobStore.OptionalOrUnknown<T>
- java.lang.Object
-
- org.nuxeo.ecm.core.blob.BlobStore.OptionalOrUnknown<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
T
get()
Returns the value if it is present, otherwise throwsNoSuchElementException
.int
hashCode()
boolean
isKnown()
Returnstrue
if the value is known (missing or present), otherwisefalse
.boolean
isMissing()
Returnstrue
if the value is missing, otherwisefalse
.boolean
isPresent()
Returnstrue
if the value is present, otherwisefalse
.boolean
isUnknown()
Returnstrue
if the value is unknown, otherwisefalse
.static <T> BlobStore.OptionalOrUnknown<T>
missing()
Returns a missing instance.static <T> BlobStore.OptionalOrUnknown<T>
of(T value)
Returns an instance of a present, non-null value.static <T> BlobStore.OptionalOrUnknown<T>
unknown()
Returns an unknown instance.
-
-
-
Method Detail
-
unknown
public static <T> BlobStore.OptionalOrUnknown<T> unknown()
Returns an unknown instance.
-
missing
public static <T> BlobStore.OptionalOrUnknown<T> missing()
Returns a missing instance.
-
of
public static <T> BlobStore.OptionalOrUnknown<T> of(T value)
Returns an instance of a present, non-null value.
-
isUnknown
public boolean isUnknown()
Returnstrue
if the value is unknown, otherwisefalse
.
-
isKnown
public boolean isKnown()
Returnstrue
if the value is known (missing or present), otherwisefalse
.
-
isPresent
public boolean isPresent()
Returnstrue
if the value is present, otherwisefalse
.
-
isMissing
public boolean isMissing()
Returnstrue
if the value is missing, otherwisefalse
.
-
get
@NotNull public T get()
Returns the value if it is present, otherwise throwsNoSuchElementException
.- Throws:
NoSuchElementException
- if there is no value present
-
-