Class State

java.lang.Object
it.tugamer89.autogex.core.State

public class State extends Object
Represents a state (q) within an automaton.
  • Constructor Details

    • State

      public State(String name, boolean isFinal)
      Constructs a new State.
      Parameters:
      name - The unique name of the state.
      isFinal - True if the state is an accepting (final) state.
  • Method Details

    • getName

      public String getName()
      Gets the name of the state.
      Returns:
      The state name.
    • isFinal

      public boolean isFinal()
      Checks if the state is a final (accepting) state.
      Returns:
      True if final, false otherwise.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object