T
- The parameter class must extend Action.public class CompositeAction<T extends Action> extends AbstractAction implements Collection<T>
Collection
of zero or more actions. It is enabled
if all of it's contained actions are enabled.Modifier and Type | Field and Description |
---|---|
private Collection<T> |
actions |
Constructor and Description |
---|
CompositeAction(Collection<T> theActions) |
CompositeAction(String theName,
Collection<T> theActions) |
CompositeAction(String theName,
T... theActions) |
CompositeAction(T... theActions) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T theAction) |
boolean |
addAll(Collection<? extends T> theActions) |
void |
clear() |
int |
compareTo(Action theAction)
Compares based on:
the
String.compareTo(String) of AbstractAction.getName()
the compareTo() of the sorted members of the preconditions
the compareTo() of the sorted members of the postconditions
|
boolean |
contains(Object theObject) |
boolean |
containsAll(Collection<?> theObjects) |
boolean |
isEmpty() |
boolean |
isEnabled() |
Iterator<T> |
iterator() |
boolean |
remove(Object theObject) |
boolean |
removeAll(Collection<?> theObjects) |
boolean |
retainAll(Collection<?> theObjects) |
Status |
run(Object... theParameters)
This is the actual action of the action.
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] theObjects) |
addPostCondition, addPostConditions, addPreCondition, addPreConditions, clearPostConditions, clearPreConditions, equals, execute, getName, getPostConditions, getPreConditions, removePostCondition, removePreCondition
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
private Collection<T extends Action> actions
public CompositeAction(T... theActions)
public CompositeAction(Collection<T> theActions)
public CompositeAction(String theName, Collection<T> theActions)
public final boolean isEnabled()
isEnabled
in interface Action
isEnabled
in class AbstractAction
public Status run(Object... theParameters) throws IllegalOperationException
AbstractAction
AbstractAction.execute(Object...)
.run
in class AbstractAction
theParameters
- Any parameters required by the specific override of this method.Status
object, according the the specific override of this method.IllegalOperationException
public boolean add(T theAction)
add
in interface Collection<T extends Action>
public boolean addAll(Collection<? extends T> theActions)
addAll
in interface Collection<T extends Action>
public void clear()
clear
in interface Collection<T extends Action>
public boolean contains(Object theObject)
contains
in interface Collection<T extends Action>
public boolean containsAll(Collection<?> theObjects)
containsAll
in interface Collection<T extends Action>
public boolean isEmpty()
isEmpty
in interface Collection<T extends Action>
public boolean remove(Object theObject)
remove
in interface Collection<T extends Action>
public boolean removeAll(Collection<?> theObjects)
removeAll
in interface Collection<T extends Action>
public boolean retainAll(Collection<?> theObjects)
retainAll
in interface Collection<T extends Action>
public int size()
size
in interface Collection<T extends Action>
public Object[] toArray()
toArray
in interface Collection<T extends Action>
public <T> T[] toArray(T[] theObjects)
toArray
in interface Collection<T extends Action>
public int compareTo(Action theAction)
AbstractAction
String.compareTo(String)
of AbstractAction.getName()
compareTo
in interface Comparable<Action>
compareTo
in class AbstractAction