public function setPaths($paths)
    {
        if (!$paths instanceof PriorityQueue) {
            $paths = new PriorityQueue($paths);
        }

        $this->paths = $paths;

        return $this;
    }