package com.wizzardo.tools.collections.flow.flows;

import com.wizzardo.tools.collections.flow.Flow;
import com.wizzardo.tools.collections.flow.FlowProcessor;

/**
 * Created by wizzardo on 16.04.16.
 */
public class FlowContinue<T> extends FlowProcessor<T, T> {
    protected final Flow<?> flow;

    public FlowContinue(Flow<?> flow) {
        this.flow = flow;
    }

    @Override
    protected void start() {
        start(flow);
    }

    @Override
    protected void stop() {
        stop(flow);
    }

    @Override
    public void process(T t) {
        child.process(t);
    }

    @Override
    protected void onEnd() {
    }

    protected void doOnEnd() {
        if (child != null)
            onEnd(child);
    }
}

@@ -357,16 +357,51 @@
 = flow;%0A
+        child = new FlowNoop%3CT%3E();%0A
     %7D%0A%0A 

fix test