@override bool evaluate(String input) { if (!hasValidInput(input)) return false; final states = extendedTransition(initialState, input); return states.any(finalStates.contains); }