Constructor and Description |
---|
Consumers() |
Modifier and Type | Method and Description |
---|---|
static <T,R> Consumer<T> |
compose(Function<? super T,? extends R> function,
Consumer<? super R> consumer)
The equivalent of
Function.compose(java.util.function.Function<? super V, ? extends T>) , but for Consumer. |
static <T> Consumer<T> |
doNothing()
A Consumer which does nothing.
|
static <T> Consumer<T> |
redirectable(Supplier<Consumer<T>> target)
A Consumer which always passes its its input to whatever Consumer is supplied by target.
|
public static <T> Consumer<T> doNothing()
public static <T,R> Consumer<T> compose(Function<? super T,? extends R> function, Consumer<? super R> consumer)
Function.compose(java.util.function.Function<? super V, ? extends T>)
, but for Consumer.