public final class ActionUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ActionUtils.Action<T> |
Constructor and Description |
---|
ActionUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> ActionUtils.Action<T> |
composite(Action<? super T>... actions) |
static <T> ActionUtils.Action<T> |
composite(Iterable<? extends Action<? super T>> actions) |
static boolean |
doesSomething(Action<?> action) |
static <T> ActionUtils.Action<T> |
doNothing()
Creates an action implementation that simply does nothing.
|
static <T> ActionUtils.Action<T> |
onlyIf(Spec<? super T> spec,
Action<? super T> action)
Returns an action delegating to the specified action only if the spec is satisfied by the object passed during execution.
|
public static <T> ActionUtils.Action<T> doNothing()
@SafeVarargs public static <T> ActionUtils.Action<T> composite(Action<? super T>... actions)
public static <T> ActionUtils.Action<T> composite(Iterable<? extends Action<? super T>> actions)
public static boolean doesSomething(Action<?> action)
public static <T> ActionUtils.Action<T> onlyIf(Spec<? super T> spec, Action<? super T> action)
T
- the type of the executing objects.spec
- a spec to filter the executing objects.action
- an action to delegate to when the spec is satisfied.