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
Direct Known Subclasses:
DAutomaton, NAutomaton

public abstract class Automaton<L,T> extends Object implements FormatClient
Base class of finite automata.
  • 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

    • size

      public int size()
      Returns the number of states of this automaton.
      Returns:
      the number of states of this automaton