org.apache.directory.shared.asn1.ber.grammar
Class GrammarTransition
java.lang.Object
org.apache.directory.shared.asn1.ber.grammar.GrammarTransition
public class GrammarTransition
- extends java.lang.Object
Define a transition between two states of a grammar. It stores the next
state, and the action to execute while transiting.
- Version:
- $Rev: 664290 $, $Date: 2008-06-07 08:28:06 +0200 (Sa, 07 Jun 2008) $
- 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:
previousState
- the previous statecurrentState
- The current statecurrentTag
- the current TLV's tagaction
- 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 java.lang.String toString(IStates statesEnum)
- Parameters:
statesEnum
- Starting state.
- 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 © 2003-2009 Apache Software Foundation. All Rights Reserved.