@FunctionalInterface public interface FunctionEx<T,R>
| Modifier and Type | Method and Description |
|---|---|
default <V> FunctionEx<T,V> |
andThen(FunctionEx<? super R,? extends V> after) |
R |
apply(T t)
Applies this function to the given argument.
|
default <V> FunctionEx<V,R> |
compose(FunctionEx<? super V,? extends T> before)
Returns a composed function that first applies the
before
function to its input, and then applies this function to the result. |
static <T> FunctionEx<T,T> |
identity()
Returns a function that always returns its input argument.
|
R apply(T t) throws Exception
t - the function argumentExceptiondefault <V> FunctionEx<V,R> compose(@Nonnull FunctionEx<? super V,? extends T> before) throws Exception
before
function to its input, and then applies this function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.V - the type of input to the before function, and to the
composed functionbefore - the function to apply before this function is appliedbefore
function and then applies this functionNullPointerException - if before is nullExceptionandThen(FunctionEx)default <V> FunctionEx<T,V> andThen(FunctionEx<? super R,? extends V> after)
static <T> FunctionEx<T,T> identity()
T - the type of the input and output objects to the functionCopyright © 2017 etc.to. All rights reserved.