@Deprecated public abstract class Functions extends Object
Constructor and Description |
---|
Functions()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <T> Consumer<T> |
chain(Consumer<T>... consumers)
Deprecated.
|
static <T> Consumer<T> |
consumer(Runnable r)
Deprecated.
|
static <T,V> Function<T,V> |
function(Callable<V> c)
Deprecated.
|
static <LEFT,RIGHT,V> |
functionFrom(BiFunction<LEFT,RIGHT,V> pairFunction)
Deprecated.
Wrap a given
BiFunction that applies transformation to a Tuple2 into a Function Tuple2. |
static <LEFT,RIGHT,V> |
pairFrom(Function<Tuple2<LEFT,RIGHT>,V> function)
Deprecated.
Wrap a given
Function that applies transformation to a Tuple2 into a PairFunction. |
static <T> Supplier<T> |
supplier(Callable<T> callable)
Deprecated.
|
static <T> Supplier<T> |
supplier(Class<T> type)
Deprecated.
Creates a
Supplier that will return a new instance of type each time
it's called. |
static <T> Supplier<T> |
supplier(Future<T> future)
Deprecated.
|
static <T> Supplier<T> |
supplier(T value)
Deprecated.
Creates a
Supplier that will always return the given value . |
@SafeVarargs public static <T> Consumer<T> chain(Consumer<T>... consumers)
public static <LEFT,RIGHT,V> BiFunction<LEFT,RIGHT,V> pairFrom(Function<Tuple2<LEFT,RIGHT>,V> function)
Function
that applies transformation to a Tuple2 into a PairFunction.function
- tuple2 function to wrap into a PairFunctionBiFunction
that delegates to a new applied tuple if called with 2 arguments an to the applied tuple itself.public static <LEFT,RIGHT,V> Function<Tuple2<LEFT,RIGHT>,V> functionFrom(BiFunction<LEFT,RIGHT,V> pairFunction)
BiFunction
that applies transformation to a Tuple2 into a Function Tuple2.pairFunction
- PairFunction to wrap into a FunctionBiFunction
that delegates to a new applied tuple if called with 2 arguments an to the applied tuple itself.public static <T> Supplier<T> supplier(T value)
Supplier
that will always return the given value
.value
- the value to be suppliedpublic static <T> Supplier<T> supplier(Class<T> type)
Supplier
that will return a new instance of type
each time
it's called.type
- The type to createIllegalArgumentException
- if type
does not have a zero-args constructorCopyright © 2016. All rights reserved.