예제 #1
0
 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);
   }
 }
예제 #2
0
 public void addVisit(Visit visit) {
   getVisitsInternal().add(visit);
   visit.setPet(this);
 }