public class JkRunnables
extends java.lang.Object
implements java.lang.Runnable
Runnable
. From this object you can replace the underlying Runnable
or
chain it with other ones.Modifier and Type | Method and Description |
---|---|
JkRunnables |
chain(java.lang.Runnable chainedRunnable)
Chains this underlying
Runnable with the specified one. |
static JkRunnables |
noOp()
Creates a
JkRunnables delegating to a no-op runnable. |
static JkRunnables |
of(java.lang.Runnable runnable)
Creates a
JkRunnables delegating to the single specified Runnable . |
JkRunnables |
prependChain(java.lang.Runnable chainedRunnable)
Chains this specified
Runnable with the underlying one. |
void |
run() |
JkRunnables |
set(java.lang.Runnable runnable)
Set the specified
Runnable as the unique underlying Runnable for this container. |
public static JkRunnables of(java.lang.Runnable runnable)
JkRunnables
delegating to the single specified Runnable
.public static JkRunnables noOp()
JkRunnables
delegating to a no-op runnable.public JkRunnables set(java.lang.Runnable runnable)
Runnable
as the unique underlying Runnable
for this container.public JkRunnables chain(java.lang.Runnable chainedRunnable)
Runnable
with the specified one. The specified runnable will
be executed at the end.public JkRunnables prependChain(java.lang.Runnable chainedRunnable)
Runnable
with the underlying one. The specified runnable will
be executed first.public void run()
run
in interface java.lang.Runnable