コード例 #1
0
 private void traverseEdges(Region r, RegionDigraphVisitor visitor, Set<Region> path) {
   for (FilteredRegion fr : r.getEdges()) {
     if (visitor.preEdgeTraverse(fr.getFilter())) {
       try {
         visitRemainingSubgraph(fr.getRegion(), visitor, extendPath(r, path));
       } finally {
         visitor.postEdgeTraverse(fr.getFilter());
       }
     }
   }
 }
コード例 #2
0
 private void visitRemainingSubgraph(Region r, RegionDigraphVisitor visitor, Set<Region> path) {
   if (!path.contains(r)) {
     if (visitor.visit(r)) {
       traverseEdges(r, visitor, path);
     }
   }
 }