@Test(expected = NullPointerException.class) public void createWithoutPredicate() { factory.create(null, () -> null); }
@SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Filter stage) { Objects.requireNonNull(stage); Predicate predicate = Objects.requireNonNull(stage.getPredicate()); return source -> (Flowable<O>) source.filter(predicate::test); }
FilterStageFactory implements ProcessingStageFactory<Stage.Filter> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Filter stage) { Objects.requireNonNull(stage); Predicate predicate = Objects.requireNonNull(stage.getPredicate()); return source -> (Flowable<O>) source.filter(predicate::test); } }
FilterStageFactory implements ProcessingStageFactory<Stage.Filter> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Filter stage) { Objects.requireNonNull(stage); Predicate predicate = Objects.requireNonNull(stage.getPredicate()); return source -> (Flowable<O>) source.filter(predicate::test); }  }
FilterStageFactory implements ProcessingStageFactory<Stage.Filter> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Filter stage) { Objects.requireNonNull(stage); Predicate predicate = Objects.requireNonNull(stage.getPredicate()); return source -> (Flowable<O>) source.filter(predicate::test); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Filter stage); }
FilterStageFactory implements ProcessingStageFactory<Stage.Filter> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Filter stage) { Objects.requireNonNull(stage); Predicate predicate = Objects.requireNonNull(stage.getPredicate()); return source -> (Flowable<O>) source.filter(predicate::test); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Filter stage);  }