@Test @SuppressWarnings("unchecked") public void testUnfoldSimple() { Set<Class<? extends Operator<?, ?>>> allowed = new HashSet<>(); allowed.addAll((List) Arrays.asList(MapElements.class, ReduceByKey.class, Join.class)); DAG<Operator<?, ?>> unfolded = FlowUnfolder.unfold(flow, allowed); assertEquals(4, unfolded.size()); }
@SuppressWarnings("unchecked") public static DAG<Operator<?, ?>> unfold(Flow flow, Set<Class<? extends Operator<?, ?>>> operatorClasses) throws IllegalArgumentException { return unfold(flow, op -> operatorClasses.contains(op.getClass())); }
FlowUnfolder { @SuppressWarnings("unchecked") public static DAG<Operator<?, ?>> unfold(Flow flow, Set<Class<? extends Operator<?, ?>>> operatorClasses) throws IllegalArgumentException { return unfold(flow, op -> operatorClasses.contains(op.getClass())); } }
FlowUnfolder { @SuppressWarnings("unchecked") public static DAG<Operator<?, ?>> unfold(Flow flow, Set<Class<? extends Operator<?, ?>>> operatorClasses) throws IllegalArgumentException { return unfold(flow, op -> operatorClasses.contains(op.getClass())); }  }
FlowUnfolder { @SuppressWarnings("unchecked") public static DAG<Operator<?, ?>> unfold(Flow flow, Set<Class<? extends Operator<?, ?>>> operatorClasses) throws IllegalArgumentException { return unfold(flow, op -> operatorClasses.contains(op.getClass())); }  @SuppressWarnings("unchecked") static DAG<Operator<?, ?>> unfold(Flow flow,
      Set<Class<? extends Operator<?, ?>>> operatorClasses); static DAG<Operator<?, ?>> unfold(
      Flow flow, UnaryPredicate<Operator<?, ?>> wantTranslate); }
FlowUnfolder { @SuppressWarnings("unchecked") public static DAG<Operator<?, ?>> unfold(Flow flow, Set<Class<? extends Operator<?, ?>>> operatorClasses) throws IllegalArgumentException { return unfold(flow, op -> operatorClasses.contains(op.getClass())); }  @SuppressWarnings("unchecked") static DAG<Operator<?, ?>> unfold(Flow flow,
      Set<Class<? extends Operator<?, ?>>> operatorClasses); static DAG<Operator<?, ?>> unfold(
      Flow flow, UnaryPredicate<Operator<?, ?>> wantTranslate);  }