public boolean evaluateInput(MachineInput machineInput) {
		if(inputAdapter==null) {
			throw new IllegalStateException("No InputAdapter specified prior to calling evaluateInput()");
		}

		boolean inputIgnored = false;
		inputAdapter.queueInput(machineInput);
		while(inputAdapter.hasNext()) {
			TransitionInput transitionInput = inputAdapter.next();

			for(StateMachineEventListener<TransitionInput> listener : eventListeners) {
				listener.beforeEvaluatingInput(transitionInput, this);
			}

			boolean evaluateInput = true;
			if(currentState instanceof SubmachineState) {
				// Delegate the evaluation of the input
				submachine.evaluateInput(transitionInput);

				// If the submachine transitioned to (or was left in) a final state, extract its result value to evaluate on this machine
				if(submachine.getState() instanceof FinalState) {
					FinalState<TransitionInput> finalState = (FinalState<TransitionInput>)submachine.getState();
					transitionInput = finalState.getResult();
				} else {
					evaluateInput = false;
				}
			}

			if(evaluateInput) {
				Transition<TransitionInput> validTransition = findFirstValidTransitionFromCurrentState(transitionInput);
				if(validTransition == null) {
					inputIgnored = true;

					for(StateMachineEventListener<TransitionInput> listener : eventListeners) {
						listener.noValidTransition(transitionInput, this);
					}
				} else {
					transition(validTransition,transitionInput);
				}
			}

			for(StateMachineEventListener<TransitionInput> listener : eventListeners) {
				listener.afterEvaluatingInput(transitionInput, this);
			}
		}

		return inputIgnored;
	}