@Test public void createWithoutStage() { assertThrows(NullPointerException.class, () -> factory.create(null, null)); }
@SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Distinct stage) { Objects.requireNonNull(stage); return source -> (Multi<O>) source.transform().byDroppingDuplicates(); }
DistinctStageFactory implements ProcessingStageFactory<Stage.Distinct> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Distinct stage) { Objects.requireNonNull(stage); return source -> (Multi<O>) source.transform().byDroppingDuplicates(); } }
DistinctStageFactory implements ProcessingStageFactory<Stage.Distinct> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Distinct stage) { Objects.requireNonNull(stage); return source -> (Multi<O>) source.transform().byDroppingDuplicates(); }  }
DistinctStageFactory implements ProcessingStageFactory<Stage.Distinct> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Distinct stage) { Objects.requireNonNull(stage); return source -> (Multi<O>) source.transform().byDroppingDuplicates(); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Distinct stage); }
DistinctStageFactory implements ProcessingStageFactory<Stage.Distinct> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Distinct stage) { Objects.requireNonNull(stage); return source -> (Multi<O>) source.transform().byDroppingDuplicates(); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Distinct stage);  }