class ConcatStageFactory implements PublisherStageFactory<Stage.Concat> {

    @Override
    public <O> PublisherStage<O> create(Engine engine, Stage.Concat stage) {
        Objects.requireNonNull(engine);
        Objects.requireNonNull(stage);
        Graph g1 = stage.getFirst();
        Graph g2 = stage.getSecond();
        return new ConcatStage<>(engine, g1, g2);
    }

}