Package org.apache.lucene.util.automaton
Class Transition
java.lang.Object
org.apache.lucene.util.automaton.Transition
- All Implemented Interfaces:
Cloneable
Automaton transition.
A transition, which belongs to a source state, consists of a Unicode codepoint interval and a destination state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Transition>static final Comparator<Transition> -
Constructor Summary
ConstructorsConstructorDescriptionTransition(int min, int max, State to) Constructs a new transition.Transition(int c, State to) Constructs a new singleton interval transition. -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones this transition.booleanChecks for equality.getDest()Returns destination of this transition.intgetMax()Returns maximum of this transition interval.intgetMin()Returns minimum of this transition interval.inthashCode()Returns hash code.toString()Returns a string describing this state.
-
Field Details
-
CompareByDestThenMinMax
-
CompareByMinMaxThenDest
-
-
Constructor Details
-
Transition
Constructs a new singleton interval transition.- Parameters:
c- transition codepointto- destination state
-
Transition
Constructs a new transition. Both end points are included in the interval.- Parameters:
min- transition interval minimummax- transition interval maximumto- destination state
-
-
Method Details
-
getMin
public int getMin()Returns minimum of this transition interval. -
getMax
public int getMax()Returns maximum of this transition interval. -
getDest
Returns destination of this transition. -
equals
Checks for equality. -
hashCode
public int hashCode()Returns hash code. The hash code is based on the character interval (not the destination state). -
clone
Clones this transition. -
toString
Returns a string describing this state. Normally invoked viaAutomaton.toString().
-