/** * Moves the machine to the next state, based on the input character. * * @param c the input character. * @return the state change. */ public StateChange nextState(final char c) { StateChange change = currentState.getChange(c); currentState = change.getNewState(); return change; }