org.apache.directory.shared.asn1.ber.grammar
Class GrammarTransition
java.lang.Object
org.apache.directory.shared.asn1.ber.grammar.GrammarTransition
public class GrammarTransition
- extends Object
Define a transition between two states of a grammar. It stores the next
state, and the action to execute while transiting.
- Author:
- Apache Directory Project
Constructor Summary |
GrammarTransition(int previousState,
int currentState,
int currentTag,
IAction action)
Creates a new GrammarTransition object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GrammarTransition
public GrammarTransition(int previousState,
int currentState,
int currentTag,
IAction action)
- Creates a new GrammarTransition object.
- Parameters:
currentState
- The current transitionaction
- The action to execute. It could be null.
hasAction
public boolean hasAction()
- Tells if the transition has an associated action.
- Returns:
true
if an action has been asociated to the
transition
getAction
public IAction getAction()
- Returns:
- Returns the action associated with the transition
toString
public String toString(IStates statesEnum)
- Parameters:
grammar
- The grammar which state we want a String from
- Returns:
- A representation of the transition as a string.
getCurrentState
public int getCurrentState()
- Returns:
- The current state
getPreviousState
public int getPreviousState()
- Returns:
- The previous state
Copyright © 2004-2012. All Rights Reserved.