Ejemplo n.º 1
0
 private static void iterateParents(
     Operator<?> operator, Function<Operator<?>> function, Set<Operator<?>> visited) {
   if (!visited.add(operator)) {
     return;
   }
   function.apply(operator);
   if (operator.getNumParent() > 0) {
     for (Operator<?> parent : operator.getParentOperators()) {
       iterateParents(parent, function, visited);
     }
   }
 }
Ejemplo n.º 2
0
 public static void iterateParents(Operator<?> operator, Function<Operator<?>> function) {
   iterateParents(operator, function, new HashSet<Operator<?>>());
 }