public class JkConsumers<T,P>
extends java.lang.Object
implements java.util.function.Consumer<T>
Consumer. From this object you can replace the underlying Runnable or
chain it with other ones.| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t) |
JkConsumers<T,P> |
append(java.util.function.Consumer<T> appendedConsumer)
Chains this underlying
Consumer with the specified one. |
static <T> JkConsumers<T,java.lang.Void> |
of()
Creates a
JkConsumers delegating to the single specified Consumer. |
static <T,P> JkConsumers<T,P> |
ofParent(P parent)
Same as
of() but providing a parent chaining. |
JkConsumers<T,P> |
prepend(java.util.function.Consumer<T> appendedConsumer)
Chains this underlying
Consumer with the specified one. |
JkConsumers<T,P> |
set(java.util.function.Consumer<T> consumer)
Set the specified
Consumer as the unique underlying element for this container. |
public final P __
public static <T> JkConsumers<T,java.lang.Void> of()
JkConsumers delegating to the single specified Consumer.public static <T,P> JkConsumers<T,P> ofParent(P parent)
of() but providing a parent chaining.public JkConsumers<T,P> set(java.util.function.Consumer<T> consumer)
Consumer as the unique underlying element for this container.public JkConsumers<T,P> append(java.util.function.Consumer<T> appendedConsumer)
Consumer with the specified one. The specified element will
be executed at the end.public JkConsumers<T,P> prepend(java.util.function.Consumer<T> appendedConsumer)
Consumer with the specified one. The specified element will
be executed at the beginning.