|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.fsm.Transition
This class implements a Finite State Machine transition. A transition is owned by a gate.fsm.State object and contains set of restrictions and a reference to the next state that will be accessed after consuming a set of input symbols according to the restrictions. A transition can also hold information about the label that should be bound to the symbols (annotations) consumed during the state transition.
Field Summary | |
private LinkedList |
bindings
A list with all the labels associated to the annotations recognized by this transition. |
private BasicPatternElement |
constraints
The constraints on this transition. |
private static boolean |
DEBUG
Debug flag |
private static int |
index
Static member used for generating unique IDs for the objects of type Transition |
private int |
myIndex
The unique index of this transition. |
private State |
target
The state this transition leads to |
Constructor Summary | |
Transition()
Default constructor. |
|
Transition(BasicPatternElement constraints,
State state)
Creates a new transition using the given set of constraints and target state. |
|
Transition(BasicPatternElement constraints,
State state,
LinkedList bindings)
Ctreates a new transition from a set of constraints, a target state and a list of labels to be bound with the recognized input symbols (aka annotations). |
Method Summary | |
LinkedList |
getBindings()
Returns the list of bindings associated to this transition |
BasicPatternElement |
getConstraints()
Gets the constraints associated to this transition |
State |
getTarget()
Gets the target state of this transition |
String |
shortDesc()
Returns a shorter description that toSting(). |
String |
toString()
Returns a textual desciption of this transition. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final boolean DEBUG
private BasicPatternElement constraints
private State target
private LinkedList bindings
private int myIndex
private static int index
Constructor Detail |
public Transition()
public Transition(BasicPatternElement constraints, State state)
constraints
- the set on constraints associated to this transitionstate
- the target state of this transitionpublic Transition(BasicPatternElement constraints, State state, LinkedList bindings)
Method Detail |
public State getTarget()
public BasicPatternElement getConstraints()
public String toString()
toString
in class Object
public String shortDesc()
public LinkedList getBindings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |