public class GrammarTransition extends Object
Constructor and Description |
---|
GrammarTransition(int currentState,
int nextState,
GrammarAction action)
Creates a new GrammarTransition object.
|
Modifier and Type | Method and Description |
---|---|
GrammarAction |
getAction()
Gets the action associated with the transition
|
int |
getNextState()
Gets the target state
|
boolean |
hasAction()
Tells if the transition has an associated action.
|
String |
toString(int grammar,
IStates statesEnum)
Returns a representation of the transition as a string
|
public GrammarTransition(int currentState, int nextState, GrammarAction action)
currentState
- The current transitionnextState
- The target stateaction
- The action to execute. It could be null.public int getNextState()
public boolean hasAction()
true
if an action has been asociated to the
transitionpublic GrammarAction getAction()
public String toString(int grammar, IStates statesEnum)
grammar
- the grammar which state we want a String fromstatesEnum
- the states enum that contains the states' namesCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.