class DropWhileStageFactory implements ProcessingStageFactory<Stage.DropWhile> {

    @Override
    public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.DropWhile stage) {
        Predicate<I> predicate = Casts.cast(stage.getPredicate());
        return Casts.cast(new TakeWhile<>(predicate));
    }

}