Class Transition

    • Field Detail

      • _min

        public char _min
      • _max

        public char _max
    • Constructor Detail

      • Transition

        public Transition​(char c,
                          State to)
        Constructs a new singleton interval transition.
        Parameters:
        c - transition character
        to - destination state
      • Transition

        public Transition​(char min,
                          char max,
                          State to)
        Constructs a new transition. Both end points are included in the interval.
        Parameters:
        min - transition interval minimum
        max - transition interval maximum
        to - destination state
    • Method Detail

      • getDest

        public State getDest()
        Returns destination of this transition.
      • equals

        public boolean equals​(Object obj)
        Checks for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - object to compare with
        Returns:
        true if obj is a transition with same character interval and destination state as this transition.
      • hashCode

        public int hashCode()
        Returns hash code. The hash code is based on the character interval (not the destination state).
        Overrides:
        hashCode in class Object
        Returns:
        hash code
      • clone

        public Transition clone()
        Clones this transition.
        Overrides:
        clone in class Object
        Returns:
        clone with same character interval and destination state