Class NFA

All Implemented Interfaces:
Automaton

public class NFA extends AbstractAutomaton
Non-Deterministic Finite Automaton (NFA).
  • Method Details

    • accepts

      public boolean accepts(String input)
      Fast-path evaluation of an input string bypassing ExecutionTrace generation. Overrides the default method to minimize memory allocation and maximize performance.
      Parameters:
      input - The string to be evaluated.
      Returns:
      true if the string is accepted, false otherwise.
    • execute

      public ExecutionTrace execute(String input)
      Description copied from interface: Automaton
      Processes the input string and returns a detailed execution trace.
      Parameters:
      input - The string to be evaluated.
      Returns:
      An ExecutionTrace detailing the entire state traversal.
    • getTransitionTable

      public Map<State, Map<Character, Set<State>>> getTransitionTable()
      Retrieves the internal transition table of the NFA.
      Returns:
      The transition table.