@Test public void scatterPreparation() throws Exception { final Preparation preparation = new Preparation(); final Step step1 = new FixedIdStep("step-1234"); final Step step2 = new FixedIdStep("step-5678"); preparation.setSteps(Arrays.asList(step1, step2)); repository.add(preparation); final Collection<Identifiable> identifiableList = PreparationUtils.scatter(preparation); assertEquals(3, identifiableList.size()); final Iterator<Identifiable> iterator = identifiableList.iterator(); assertEquals(preparation, iterator.next()); assertEquals(step1, iterator.next()); assertEquals(step2, iterator.next()); }
public static Collection<Identifiable> scatter(Identifiable source) { final List<Identifiable> identifiableList = new LinkedList<>(); walk(source, (object) -> object instanceof Identifiable && identifiableList.add((Identifiable) object)); return identifiableList; }
PreparationUtils { public static Collection<Identifiable> scatter(Identifiable source) { final List<Identifiable> identifiableList = new LinkedList<>(); walk(source, (object) -> object instanceof Identifiable && identifiableList.add((Identifiable) object)); return identifiableList; } }
PreparationUtils { public static Collection<Identifiable> scatter(Identifiable source) { final List<Identifiable> identifiableList = new LinkedList<>(); walk(source, (object) -> object instanceof Identifiable && identifiableList.add((Identifiable) object)); return identifiableList; }  }
PreparationUtils { public static Collection<Identifiable> scatter(Identifiable source) { final List<Identifiable> identifiableList = new LinkedList<>(); walk(source, (object) -> object instanceof Identifiable && identifiableList.add((Identifiable) object)); return identifiableList; }  static void prettyPrint(PreparationRepository repository, Preparation preparation, OutputStream out); static Collection<Identifiable> scatter(Identifiable source); List<String> listStepsIds(final String stepId, final PreparationRepository repository); List<String> listStepsIds(final String stepId, final String limit, final PreparationRepository repository); List<Step> listSteps(String headStepId, PreparationRepository repository); List<Step> listSteps(final Step step, final String limit, final PreparationRepository repository); static List<String> getPreparationIdForStepRowMetadata(final List<String> stepRowMetadataUpdated,
            final PreparationRepository repository); }
PreparationUtils { public static Collection<Identifiable> scatter(Identifiable source) { final List<Identifiable> identifiableList = new LinkedList<>(); walk(source, (object) -> object instanceof Identifiable && identifiableList.add((Identifiable) object)); return identifiableList; }  static void prettyPrint(PreparationRepository repository, Preparation preparation, OutputStream out); static Collection<Identifiable> scatter(Identifiable source); List<String> listStepsIds(final String stepId, final PreparationRepository repository); List<String> listStepsIds(final String stepId, final String limit, final PreparationRepository repository); List<Step> listSteps(String headStepId, PreparationRepository repository); List<Step> listSteps(final Step step, final String limit, final PreparationRepository repository); static List<String> getPreparationIdForStepRowMetadata(final List<String> stepRowMetadataUpdated,
            final PreparationRepository repository);  }