@SuppressWarnings("ConstantConditions") @Test public void createWithoutStage() { assertThrows(NullPointerException.class, () -> factory.create(null, null)); }
@SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Limit stage) { long limit = stage.getLimit(); return source -> (Multi<O>) source.transform().byTakingFirstItems(limit); }
LimitStageFactory implements ProcessingStageFactory<Stage.Limit> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Limit stage) { long limit = stage.getLimit(); return source -> (Multi<O>) source.transform().byTakingFirstItems(limit); } }
LimitStageFactory implements ProcessingStageFactory<Stage.Limit> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Limit stage) { long limit = stage.getLimit(); return source -> (Multi<O>) source.transform().byTakingFirstItems(limit); }  }
LimitStageFactory implements ProcessingStageFactory<Stage.Limit> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Limit stage) { long limit = stage.getLimit(); return source -> (Multi<O>) source.transform().byTakingFirstItems(limit); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Limit stage); }
LimitStageFactory implements ProcessingStageFactory<Stage.Limit> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Limit stage) { long limit = stage.getLimit(); return source -> (Multi<O>) source.transform().byTakingFirstItems(limit); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Limit stage);  }