public abstract class AbstractTransition extends java.lang.Object implements Transition
Transition implementation. Takes care of matching the
current Event's id against the id of the Event this
Transition handles. To handle any Event the id should be set
to Event.WILDCARD_EVENT_ID.| 构造器和说明 |
|---|
AbstractTransition(java.lang.Object eventId)
|
AbstractTransition(java.lang.Object eventId,
State nextState)
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract boolean |
doExecute(Event event)
Executes this
Transition. |
boolean |
equals(java.lang.Object o) |
boolean |
execute(Event event)
Executes this
Transition. |
State |
getNextState() |
int |
hashCode() |
java.lang.String |
toString() |
public AbstractTransition(java.lang.Object eventId)
eventId - the Event id.public State getNextState()
getNextState 在接口中 TransitionState which the StateMachine should move to
if this Transition is taken and Transition.execute(Event) returns
true. null if this Transition is a loopback
Transition.public boolean execute(Event event)
TransitionTransition. It is the responsibility of this
Transition to determine whether it actually applies for the
specified Event. If this Transition doesn't apply
nothing should be executed and false must be returned.execute 在接口中 Transitionevent - the current Event.Transition was executed,
false otherwise.protected abstract boolean doExecute(Event event)
Transition. This method doesn't have to check
if the Event's id matches because execute(Event) has
already made sure that that is the case.event - the current Event.Transition has been executed
successfully and the StateMachine should move to the
next State. false otherwise.public boolean equals(java.lang.Object o)
equals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在类中 java.lang.Objectpublic java.lang.String toString()
toString 在类中 java.lang.Object