public interface Action extends Comparable<Action>
Modifier and Type | Method and Description |
---|---|
void |
addPostCondition(PostCondition theCondition)
Adds the Condition to this Acitons's set of postconditions.
|
void |
addPostConditions(Collection<PostCondition> theConditions)
Adds Conditions to this Action's set of postconditions.
|
void |
addPreCondition(PreCondition theCondition)
Adds the Condition to this Acitons's set of preconditions.
|
void |
addPreConditions(Collection<PreCondition> theConditions)
Adds Conditions to this Action's set of preconditions.
|
void |
clearPostConditions()
Removes all postconditions from this action.
|
void |
clearPreConditions()
Removes all preconditions from this action.
|
Status |
execute(Object... theParameters)
Execute the action, but ONLY if the preconditions are satisfied.
|
String |
getName()
Used in
#compareTo(Action) and #equals(Object) . |
Collection<PostCondition> |
getPostConditions() |
Collection<PreCondition> |
getPreConditions() |
boolean |
isEnabled() |
void |
removePostCondition(PostCondition theCondition)
Removes the Condition from this action, if it in the set of preconditions.
|
void |
removePreCondition(PreCondition theCondition)
Removes the Condition from this action, if it in the set of preconditions.
|
compareTo
Status execute(Object... theParameters) throws IllegalOperationException
theParameters
- StatusObject
containing that result.IllegalOperationException
Status
String getName()
#compareTo(Action)
and #equals(Object)
.boolean isEnabled()
Collection<PreCondition> getPreConditions()
void addPreConditions(Collection<PreCondition> theConditions)
theConditions
- void addPreCondition(PreCondition theCondition)
theCondition
- void removePreCondition(PreCondition theCondition)
theCondition
- void clearPreConditions()
Collection<PostCondition> getPostConditions()
void addPostConditions(Collection<PostCondition> theConditions)
theConditions
- void addPostCondition(PostCondition theCondition)
theCondition
- void removePostCondition(PostCondition theCondition)
theCondition
- void clearPostConditions()