Package dk.brics.automaton
Class Transition
java.lang.Object
dk.brics.automaton.Transition
- All Implemented Interfaces:
Serializable,Cloneable
Automaton transition.
A transition, which belongs to a source state, consists of a Unicode character interval and a destination state.
- Author:
- Anders Møller <amoeller@cs.au.dk>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTransition(char min, char max, State to) Constructs a new transition.Transition(char 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.chargetMax()Returns maximum of this transition interval.chargetMin()Returns minimum of this transition interval.inthashCode()Returns hash code.toString()Returns a string describing this state.
-
Constructor Details
-
Transition
Constructs a new singleton interval transition.- Parameters:
c- transition characterto- 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 char getMin()Returns minimum of this transition interval. -
getMax
public char 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().
-