/** * Add topic to set of visited topics. * * @param path topic path, may contain a fragment */ public void visit(final URI path) { final URI localPath = stripFragment(path).normalize(); visitSet.add(localPath); }
/** Resets all internal data structures. */ public void reset() { idMap.clear(); visitSet.clear(); index = 0; }
/** * Return if this path has been visited before. * * @param path topic path, may contain a fragment * @return true if has been visited */ public boolean isVisited(final URI path) { final URI localPath = stripFragment(path).normalize(); return visitSet.contains(localPath); }