| Modifier and Type | Method and Description |
|---|---|
<AFTER> FunctionWrapper<IN,AFTER> |
andThen(Function<? super OUT,AFTER> after)
Returns a composed function wrapper that first applies this function to its input, and then
applies the after function to the result.
|
OUT |
apply(IN in)
Applies this function to the given argument.
|
static <IN,OUT> FunctionWrapper<IN,OUT> |
castTo(Class<? extends OUT> type)
Returns a function wrapper casting the passed inputs to the specified class.
The returned object will support concatenation and comparison. |
static <IN,OUT> FunctionWrapper<IN,OUT> |
castTo(ClassToken<? extends OUT> token)
Returns a function wrapper casting the passed inputs to the specified class token type.
The returned object will support concatenation and comparison. |
<BEFORE> FunctionWrapper<BEFORE,OUT> |
compose(Function<BEFORE,? extends IN> before)
Returns a composed function wrapper that first applies the before function to its input,
and then applies this function to the result.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
hasStaticContext()
Checks if the functions wrapped by this instance have a static context.
|
static <IN> FunctionWrapper<IN,IN> |
identity()
Returns the identity function wrapper.
The returned object will support concatenation and comparison. |
@NotNull public static <IN,OUT> FunctionWrapper<IN,OUT> castTo(@NotNull Class<? extends OUT> type)
IN - the input data type.OUT - the output data type.type - the class type.@NotNull public static <IN,OUT> FunctionWrapper<IN,OUT> castTo(@NotNull ClassToken<? extends OUT> token)
IN - the input data type.OUT - the output data type.token - the class token.@NotNull public static <IN> FunctionWrapper<IN,IN> identity()
IN - the input data type.@NotNull public <AFTER> FunctionWrapper<IN,AFTER> andThen(@NotNull Function<? super OUT,AFTER> after)
AFTER - the type of output of the after function.after - the function to apply after this function is applied.@NotNull public <BEFORE> FunctionWrapper<BEFORE,OUT> compose(@NotNull Function<BEFORE,? extends IN> before)
BEFORE - the type of input to the before function.before - the function to apply before this function is applied.public boolean hasStaticContext()