Class NullableOptional<T>
- java.lang.Object
-
- com.g2forge.alexandria.java.fluent.optional.AOptional<T>
-
- com.g2forge.alexandria.java.fluent.optional.AValueOptional<T>
-
- com.g2forge.alexandria.java.fluent.optional.NullableOptional<T>
-
- All Implemented Interfaces:
IFluent__<T>
,IFluent_0<T>
,IFluent_D<T>
,IFluent1_<T>
,IFluentG_<T>
,IOptional<T>
,IFunctional
,IRunnable
,ISupplier<T>
,IThrowRunnable<RuntimeException>
,Runnable
,Supplier<T>
public class NullableOptional<T> extends AValueOptional<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.g2forge.alexandria.java.fluent.optional.AOptional
AOptional.FallbackOptional<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected static NullableOptional<?>
EMPTY
static IOptionalFactory
FACTORY
protected boolean
isValid
-
Fields inherited from class com.g2forge.alexandria.java.fluent.optional.AValueOptional
value
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NullableOptional()
protected
NullableOptional(T value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <_T> AValueOptional<_T>
create()
protected <_T> AValueOptional<_T>
create(_T value)
static <T> NullableOptional<T>
empty()
boolean
isEmpty()
static <T> NullableOptional<T>
of(T value)
static <T> NullableOptional<T>
ofNullable(T value)
-
Methods inherited from class com.g2forge.alexandria.java.fluent.optional.AValueOptional
get
-
Methods inherited from class com.g2forge.alexandria.java.fluent.optional.AOptional
create, equals, fallback, filter, flatMap, hashCode, map, or, orGet, orThrow, override, require, toString, visit
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.g2forge.alexandria.java.fluent.IFluentG_
isNotEmpty
-
Methods inherited from interface com.g2forge.alexandria.java.function.ISupplier
run, toFunction, wrap
-
-
-
-
Field Detail
-
EMPTY
protected static final NullableOptional<?> EMPTY
-
FACTORY
public static final IOptionalFactory FACTORY
-
isValid
protected final boolean isValid
-
-
Constructor Detail
-
NullableOptional
protected NullableOptional()
-
NullableOptional
protected NullableOptional(T value)
-
-
Method Detail
-
empty
public static <T> NullableOptional<T> empty()
-
of
public static <T> NullableOptional<T> of(T value)
-
ofNullable
public static <T> NullableOptional<T> ofNullable(T value)
-
create
protected <_T> AValueOptional<_T> create()
-
create
protected <_T> AValueOptional<_T> create(_T value)
-
isEmpty
public boolean isEmpty()
-
-