Package org.antlr.analysis
Class Transition
- java.lang.Object
-
- org.antlr.analysis.Transition
-
- All Implemented Interfaces:
java.lang.Comparable<Transition>
- Direct Known Subclasses:
RuleClosureTransition
public class Transition extends java.lang.Object implements java.lang.Comparable<Transition>
A generic transition between any two state machine states. It defines some special labels that indicate things like epsilon transitions and that the label is actually a set of labels or a semantic predicate. This is a one way link. It emanates from a state (usually via a list of transitions) and has a label/target pair. I have abstracted the notion of a Label to handle the various kinds of things it can be.
-
-
Constructor Summary
Constructors Constructor Description Transition(int label, State target)Transition(Label label, State target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Transition other)booleanequals(java.lang.Object o)inthashCode()booleanisAction()booleanisEpsilon()booleanisSemanticPredicate()java.lang.StringtoString()
-
-
-
Method Detail
-
isEpsilon
public boolean isEpsilon()
-
isAction
public boolean isAction()
-
isSemanticPredicate
public boolean isSemanticPredicate()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(Transition other)
- Specified by:
compareToin interfacejava.lang.Comparable<Transition>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-