Automaton<StateType extends State> constructor

Automaton<StateType extends State>({
  1. required Set<StateType> states,
  2. required Set<String> alphabet,
})

Implementation

Automaton({
  required this.states,
  required this.alphabet,
}) {
  initialState = states.firstWhere((state) => state.isInitial);
  finalStates = states.where((state) => state.isFinal).toSet();
}