private KeyValuePair <PalmState, Action> GetNext(PalmStateCommand palmStateCommand)
        {
            PalmStateTransition transition = new PalmStateTransition(_currentState, palmStateCommand);
            KeyValuePair <PalmState, Action> nextState;

            if (!_transitions.TryGetValue(transition, out nextState))
            {
                throw new Exception("Invalid transition: " + _currentState + " -> " + palmStateCommand);
            }

            return(nextState);
        }
            public override bool Equals(object obj)
            {
                PalmStateTransition other = obj as PalmStateTransition;

                return(other != null && this._currentState == other._currentState && this._palmStateCommand == other._palmStateCommand);
            }