Package org.nuxeo.ecm.core.blob
Class BlobStore.OptionalOrUnknown<T>
java.lang.Object
org.nuxeo.ecm.core.blob.BlobStore.OptionalOrUnknown<T>
- Enclosing interface:
- BlobStore
A class representing an unknown value, a missing value, or a present (non-null) value.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
Returnstrue
if the value is missing, otherwisefalse
.boolean
Returnstrue
if the value is present, otherwisefalse
.boolean
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 Details
-
unknown
Returns an unknown instance. -
missing
Returns a missing instance. -
of
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
Returns the value if it is present, otherwise throwsNoSuchElementException
.- Throws:
NoSuchElementException
- if there is no value present
-
equals
-
hashCode
public int hashCode()
-