Class AbstractAutomatonBuilder<B extends AbstractAutomatonBuilder<B,A>, A extends Automaton>
java.lang.Object
org.eu.autogex.core.AbstractAutomatonBuilder<B,A>
- Type Parameters:
B- The concrete Builder type (e.g., DFA.Builder)A- The Automaton type to build (e.g., DFA)
- Direct Known Subclasses:
DFA.Builder, ENFA.Builder, NFA.Builder
public abstract class AbstractAutomatonBuilder<B extends AbstractAutomatonBuilder<B,A>, A extends Automaton> extends Object
Abstract builder based on the Curiously Recurring Template Pattern (CRTP). Allows sharing state creation logic among all specific Builders (DFA, NFA, ENFA) while maintaining fluid method chaining.
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new state to the automaton.abstract Abuild()Builds and returns the final automaton instance.Gets the set of all registered final states.Gets the registered initial state.Gets the map of all registered states.setInitialState(String name) Sets the initial state of the automaton.
-
Method Details
-
addState
-
setInitialState
-
build
Builds and returns the final automaton instance.- Returns:
- The compiled automaton.
-
getStatesMap
-
getFinalStates
-
getInitialState
-