|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.workstate.core.Transition
public abstract class Transition
A transition allows state changes when an event is received.
| Constructor Summary | |
|---|---|
Transition(MetaEvent event,
MetaState start,
MetaState end,
TransitionAction action,
Guard guard)
|
|
| Method Summary | |
|---|---|
protected void |
doAction(Event event,
RealState currentState)
|
boolean |
equals(Object o)
|
protected MetaState |
getEndState()
|
MetaEvent |
getEvent()
|
static Comparator<Transition> |
getGuardPriorityComparator()
Return a Comparator instance that allows the ordering of a list
of transitions based on the guard priority (high priority first). |
protected MetaState |
getStartState()
|
boolean |
hasSameTrigger(Transition transition)
Check if the given transition has the same trigger of this one. |
boolean |
isAction(TransitionAction action)
|
boolean |
isEndState(MetaState state)
|
boolean |
isEvent(MetaEvent event)
|
boolean |
isGuard(Guard guard)
|
boolean |
isStartState(MetaState state)
|
boolean |
isTriggeredBy(Event event,
State state)
Check if this transition is triggered by a given Event when the
machine is in a giben State. |
abstract void |
perform(Event event,
State currentState)
Perform this transition. |
String |
toString()
|
protected void |
undoAction(Event event,
RealState currentState)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Transition(MetaEvent event,
MetaState start,
MetaState end,
TransitionAction action,
Guard guard)
| Method Detail |
|---|
public MetaEvent getEvent()
public boolean isEvent(MetaEvent event)
public boolean isAction(TransitionAction action)
public boolean isGuard(Guard guard)
protected MetaState getStartState()
public boolean isStartState(MetaState state)
protected MetaState getEndState()
public boolean isEndState(MetaState state)
public boolean hasSameTrigger(Transition transition)
MetaEvent and must have the same Guard.
public boolean isTriggeredBy(Event event,
State state)
Event when the
machine is in a giben State. The following will be checked:
event - the received eventstate - the current state
protected void doAction(Event event,
RealState currentState)
throws WorkflowException
WorkflowException
protected void undoAction(Event event,
RealState currentState)
public abstract void perform(Event event,
State currentState)
throws WorkflowException
WorkflowExceptionpublic static Comparator<Transition> getGuardPriorityComparator()
Comparator instance that allows the ordering of a list
of transitions based on the guard priority (high priority first).
public boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||