public class FunctionUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Runnable |
composeRunnables(java.lang.Runnable r1,
java.lang.Runnable r2)
Returns a runnable which runs both supplied runnables.
|
static <A,B,C> NotNullFunction<A,C> |
composition(NotNullFunction<? super B,? extends C> f,
NotNullFunction<? super A,? extends B> g) |
static <A,B> Function<A,B> |
constant(B b) |
static <T> Function<T,T> |
id() |
static <A,B> NullableFunction<A,B> |
nullConstant() |
static <T> Function<T,java.lang.String> |
string() |
public static <T> Function<T,T> id()
public static <A,B> NullableFunction<A,B> nullConstant()
public static <T> Function<T,java.lang.String> string()
public static <A,B> Function<A,B> constant(B b)
public static <A,B,C> NotNullFunction<A,C> composition(NotNullFunction<? super B,? extends C> f, NotNullFunction<? super A,? extends B> g)
public static java.lang.Runnable composeRunnables(java.lang.Runnable r1, java.lang.Runnable r2)
r1
- first runnable to runr2
- second runnable to run