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 booleanequals(Object obj)Tget()Returns the value if it is present, otherwise throwsNoSuchElementException.inthashCode()booleanisKnown()Returnstrueif the value is known (missing or present), otherwisefalse.booleanisMissing()Returnstrueif the value is missing, otherwisefalse.booleanisPresent()Returnstrueif the value is present, otherwisefalse.booleanisUnknown()Returnstrueif 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()
Returnstrueif the value is unknown, otherwisefalse.
-
isKnown
public boolean isKnown()
Returnstrueif the value is known (missing or present), otherwisefalse.
-
isPresent
public boolean isPresent()
Returnstrueif the value is present, otherwisefalse.
-
isMissing
public boolean isMissing()
Returnstrueif 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
-
-