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

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

/**
 * Created by wizzardo on 16.04.16.
 */
public class FlowJoin<A> extends FlowProcessor<A, String> {
    private final StringBuilder sb;
    private final String separator;

    public FlowJoin(StringBuilder sb, String separator) {
        this.sb = sb;
        this.separator = separator;
    }

    @Override
    public void process(A a) {
        StringBuilder sb = this.sb;
        if (sb.length() > 0)
            sb.append(separator);

        sb.append(a);
    }

    @Override
    public String get() {
        return sb.toString();
    }
}

@@ -49,67 +49,8 @@
 s;%0A%0A
-import com.wizzardo.tools.collections.flow.FlowProcessor;%0A%0A
 /**%0A
@@ -133,18 +133,21 @@
 wProcess
-or
+OnEnd
 %3CA, Stri
@@ -558,24 +558,41 @@
 ing get() %7B%0A
+        start();%0A
         retu

update 'join'