Class Automaton<L,T>

java.lang.Object
eu.bandm.tools.lexic.Automaton<L,T>
Type Parameters:
L - the type of labels of this automaton
T - the type of transitions of this automaton
All Implemented Interfaces:
FormatClient, Serializable
Direct Known Subclasses:
DAutomaton, NAutomaton

public abstract class Automaton<L,T> extends Object implements FormatClient, Serializable
Base class of finite automata.
See Also:
  • Field Details

  • Constructor Details

    • Automaton

      protected Automaton(Automaton.State initial, Map<Automaton.State,Behavior<L,T>> table)
      Creates a new instance.

      The caller must ensure that the given behavioral table is closed, i.e., the initial state and all states that occur in behavior values do also occur as keys. That property is essential for correct operation, but not checked by this constructor.

      Parameters:
      initial - the initial state of the automaton
      table - the behavioral table of the automaton
  • Method Details

    • countStates

      public int countStates()
      Returns the number of states of this automaton.
      Returns:
      the number of states of this automaton
    • countTransitions

      public int countTransitions()
      Returns the number of transitions of this automaton.
      Returns:
      the number of transitions of this automaton