|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.pfl.basic.fsm.Runner
public class Runner
This is the main class that represents an instance of a state machine using a state engine. It may be used as a base class, in which case the guards and actions have access to the derived class.
| Constructor Summary | |
|---|---|
Runner(FSM fsm)
Create a new Runner with fsm on top of the stack. |
|
Runner(FSM fsm,
boolean debug)
|
|
| Method Summary | |
|---|---|
void |
doIt(Input in)
Perform the transition for the given input in the current state. |
boolean |
done()
Return true if the stack is empty, which means that the runner is finished. |
FSM |
peek()
Return the top fsm on the stack. |
FSM |
pop()
|
void |
push(FSM fsm)
Push a new fsm onto the stack. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Runner(FSM fsm)
public Runner(FSM fsm,
boolean debug)
| Method Detail |
|---|
public FSM peek()
public void push(FSM fsm)
public FSM pop()
public boolean done()
public void doIt(Input in)
Let S be the current state of the FSM. If there are guarded actions for S with input in, evaluate their guards successively until all have been evaluted, or one returns a non-DISABLED Result.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||