Class AOptional<T>
- java.lang.Object
-
- com.g2forge.alexandria.java.fluent.optional.AOptional<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>
- Direct Known Subclasses:
AOptional.FallbackOptional
,AValueOptional
public abstract class AOptional<T> extends Object implements IOptional<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AOptional.FallbackOptional<T>
-
Constructor Summary
Constructors Constructor Description AOptional()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract <U> AOptional<U>
create()
protected <U> AOptional<U>
create(IFluent1_<U> value)
protected abstract <U> AOptional<U>
create(U value)
boolean
equals(Object obj)
IOptional<T>
fallback(IOptional<? extends T> fallback)
AOptional<T>
filter(Predicate<? super T> predicate)
<U> IOptional<U>
flatMap(Function<? super T,? extends IFluent1_<U>> mapper)
int
hashCode()
<U> AOptional<U>
map(Function<? super T,? extends U> mapper)
T
or(T other)
T
orGet(Supplier<? extends T> other)
<X extends Throwable>
TorThrow(Supplier<? extends X> exception)
IOptional<T>
override(IOptional<? extends T> override)
protected <_T> _T
require(_T value)
String
toString()
void
visit(Consumer<? super T> consumer)
-
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_
isEmpty, isNotEmpty
-
Methods inherited from interface com.g2forge.alexandria.java.function.ISupplier
run, toFunction, wrap
-
-
-
-
Method Detail
-
create
protected abstract <U> AOptional<U> create()
-
create
protected abstract <U> AOptional<U> create(U value)
-
orThrow
public <X extends Throwable> T orThrow(Supplier<? extends X> exception) throws X extends Throwable
-
require
protected <_T> _T require(_T value)
-
-