public void visit(FileVisitor visitor) { AtomicBoolean stopFlag = new AtomicBoolean(); Visit visit = new Visit(visitor, stopFlag); for (Map.Entry<RelativePath, Action<OutputStream>> entry : elements.entrySet()) { if (stopFlag.get()) { break; } RelativePath path = entry.getKey(); Action<OutputStream> generator = entry.getValue(); visit.visit(path, generator); } }
public void addVisit(Visit visit) { getVisitsInternal().add(visit); visit.setPet(this); }