public void transfer(final LexicalElement input) throws StateTransferException {

        State nextState;

        nextState = transferTable.get(current).get(input);

        if (!current.equals(nextState)) {

            if (null != current && current.postTransfer(this, input)) {
                if (null != nextState && nextState.preTransfer(this, input)) {
                    LogUtil.d("StateMachine.transfer current: " + current.getStateName() + " input: " + input + " next: " + nextState.getStateName());
                    current = nextState;
                } else {
                    throw new StateTransferException("state transfer failed, next status preTransfer() routine return error. current: " + current + " input: " + input);
                }
            } else {
                throw new StateTransferException("state transfer failed, current status postTransfer() routine return error. current: " + current + " input: " + input);
            }
        } else {
            current.received(this, input);
        }

    }