public function canJumpToState($state)
    {
        if ($state instanceof StateInterface) {
            $state = $state->getName();
        }

        // assert that the given state exists
        $this->getState($state);

        return in_array($this->currentState->getName(), $this->statePrecedence[$state], true);
    }