Class GrammarTransition<C extends Asn1Container>
java.lang.Object
org.apache.directory.api.asn1.ber.grammar.GrammarTransition<C>
- Type Parameters:
C- The container type
Define a transition between two states of a grammar. It stores the next
state, and the action to execute while executing the transition.
- Author:
- Apache Directory Project
-
Constructor Summary
ConstructorsConstructorDescriptionGrammarTransition(Enum<?> previousState, Enum<?> currentState, int currentTag, Action<C> action, Grammar.FollowUp followUp) Creates a new GrammarTransition object.GrammarTransition(Enum<?> previousState, Enum<?> currentState, int currentTag, Grammar.FollowUp followUp) Creates a new GrammarTransition object.GrammarTransition(Enum<?> previousState, Enum<?> currentState, UniversalTag currentTag, Action<C> action, Grammar.FollowUp followUp) Creates a new GrammarTransition object.GrammarTransition(Enum<?> previousState, Enum<?> currentState, UniversalTag currentTag, Grammar.FollowUp followUp) Creates a new GrammarTransition object. -
Method Summary
Modifier and TypeMethodDescriptionGet the transition's actionEnum<?> Get the current stateEnum<?> Get the previous statebooleanTells if the transition has an associated action.booleanGet the followUp flagvoidsetFollowUp(Grammar.FollowUp followUp) Set the followUp flagtoString()
-
Constructor Details
-
GrammarTransition
public GrammarTransition(Enum<?> previousState, Enum<?> currentState, int currentTag, Action<C> action, Grammar.FollowUp followUp) 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.followUp- if the current TLV has a follow up in the current PDU
-
GrammarTransition
public GrammarTransition(Enum<?> previousState, Enum<?> currentState, int currentTag, Grammar.FollowUp followUp) Creates a new GrammarTransition object.- Parameters:
previousState- the previous statecurrentState- The current statecurrentTag- the current TLV's tagfollowUp- if the current TLV has a follow up in the current PDU
-
GrammarTransition
public GrammarTransition(Enum<?> previousState, Enum<?> currentState, UniversalTag currentTag, Action<C> action, Grammar.FollowUp followUp) 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.followUp- if the current TLV has a follow up in the current PDU
-
GrammarTransition
public GrammarTransition(Enum<?> previousState, Enum<?> currentState, UniversalTag currentTag, Grammar.FollowUp followUp) Creates a new GrammarTransition object.- Parameters:
previousState- the previous statecurrentState- The current statecurrentTag- the current TLV's tagfollowUp- if the current TLV has a follow up in the current PDU
-
-
Method Details
-
hasAction
public boolean hasAction()Tells if the transition has an associated action.- Returns:
trueif an action has been associated to the transition
-
getAction
-
getCurrentState
-
getPreviousState
-
hasFollowUp
public boolean hasFollowUp()Get the followUp flag- Returns:
- the followUp flag
-
setFollowUp
Set the followUp flag- Parameters:
followUp- the followUp flag to set
-
toString
-