public class Functionals
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Functionals.ConstantFunction<I,O>
like guava equivalent but parametrises the input generic type, and allows tostring to be customised
|
Constructor and Description |
---|
Functionals() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.concurrent.Callable<T> |
callable( |
static <T,U> java.util.concurrent.Callable<U> |
callable( |
static <A,B,C> |
chain(
applies f1 to the input, then the result of that is passed to f2 (note opposite semantics to
Functions#compose(Function, Function) |
static <A,B,C,D> |
chain(
applies f1 to the input, then f2 to that result, then f3 to that result
|
static <A,B,C,D,E> |
chain(
applies f1 to the input, then f2 to that result, then f3 to that result, then f4 to that result
|
static <I,O> |
function(
like guava
Functions#forSupplier(Supplier) but parametrises the input generic type |
static <I> |
function(java.lang.Runnable runnable) |
static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> |
ifEquals(I test) |
static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> |
ifNotEquals(I test) |
static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> |
ifPredicate( |
static <T> |
predicate( |
static java.lang.Runnable |
runnable( |
public static <A,B,C>chain( f1, f2)
Functions#compose(Function, Function)
public static <A,B,C,D>chain( f1, f2, f3)
public static <A,B,C,D,E>chain( f1, f2, f3, f4)
public static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> ifEquals(I test)
IfFunctions
public static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> ifNotEquals(I test)
IfFunctions
public static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> ifPredicate(test)
IfFunctions
public static <I,O>function( supplier)
Functions#forSupplier(Supplier)
but parametrises the input generic typepublic static <I>function(java.lang.Runnable runnable)
public static java.lang.Runnable runnable(supplier)
public static <T> java.util.concurrent.Callable<T> callable(supplier)
public static <T,U> java.util.concurrent.Callable<U> callable(f, T x)
public static <T>predicate( f)