Class IOptionalFunction.Overridden<I,O>
- java.lang.Object
-
- com.g2forge.alexandria.java.fluent.optional.function.IOptionalFunction.Overridden<I,O>
-
- All Implemented Interfaces:
IOptionalFunction<I,O>
,IOptionalFunctional<I,O,IOptionalFunction<? super I,? extends O>>
,IConsumer
,IConsumer1<I>
,IFunction<IOptional<? extends O>>
,IFunction1<I,IOptional<? extends O>>
,IFunctional
,IThrowConsumer1<I,RuntimeException>
,IThrowFunction1<I,IOptional<? extends O>,RuntimeException>
,Consumer<I>
,Function<I,IOptional<? extends O>>
- Enclosing interface:
- IOptionalFunction<I,O>
public static class IOptionalFunction.Overridden<I,O> extends Object implements IOptionalFunction<I,O>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.g2forge.alexandria.java.function.IFunction1
IFunction1.Identity<T>
-
Nested classes/interfaces inherited from interface com.g2forge.alexandria.java.fluent.optional.function.IOptionalFunction
IOptionalFunction.Empty<I,O>, IOptionalFunction.Overridden<I,O>, IOptionalFunction.Recursive<I,O>, IOptionalFunction.Restricted<I,O>
-
-
Field Summary
Fields Modifier and Type Field Description protected List<IOptionalFunction<? super I,? extends O>>
functions
-
Constructor Summary
Constructors Constructor Description Overridden(IOptionalFunction<? super I,? extends O>... functions)
Overridden(List<IOptionalFunction<? super I,? extends O>> functions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IOptional<? extends O>
apply(I i)
protected boolean
canEqual(Object other)
boolean
equals(Object o)
List<IOptionalFunction<? super I,? extends O>>
getFunctions()
int
hashCode()
IOptionalFunction<I,O>
override(IOptionalFunction<? super I,? extends O> override)
Create a function where any value returned fromoverride
overrides the value this function would return.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.g2forge.alexandria.java.function.IConsumer1
andThen
-
Methods inherited from interface com.g2forge.alexandria.java.function.IFunction1
accept, andThen, applyWithFallback, compose, curry, lift, lift, noReturn, override, sync, toConsumer, toFunction, wrap
-
Methods inherited from interface com.g2forge.alexandria.java.fluent.optional.function.IOptionalFunction
fallback, recursive, restrict
-
Methods inherited from interface com.g2forge.alexandria.java.function.IThrowFunction1
wrap
-
-
-
-
Field Detail
-
functions
protected final List<IOptionalFunction<? super I,? extends O>> functions
-
-
Constructor Detail
-
Overridden
@SafeVarargs public Overridden(IOptionalFunction<? super I,? extends O>... functions)
-
Overridden
@ConstructorProperties("functions") public Overridden(List<IOptionalFunction<? super I,? extends O>> functions)
-
-
Method Detail
-
apply
public IOptional<? extends O> apply(I i)
- Specified by:
apply
in interfaceFunction<I,O>
- Specified by:
apply
in interfaceIThrowFunction1<I,IOptional<? extends O>,RuntimeException>
-
override
public IOptionalFunction<I,O> override(IOptionalFunction<? super I,? extends O> override)
Description copied from interface:IOptionalFunctional
Create a function where any value returned fromoverride
overrides the value this function would return.- Specified by:
override
in interfaceIOptionalFunction<I,O>
- Specified by:
override
in interfaceIOptionalFunctional<I,O,IOptionalFunction<? super I,? extends O>>
- Parameters:
override
- The function whose return values, when any, override our own.- Returns:
- An optional function which returns the results of
override
if any, and the result of this optional function otherwise. - See Also:
IOptionalFunctional.fallback(Function)
-
getFunctions
public List<IOptionalFunction<? super I,? extends O>> getFunctions()
-
canEqual
protected boolean canEqual(Object other)
-
-