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

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

/**
 * Created by wizzardo on 16.04.16.
 */
public class FlowLast<A> extends FlowProcessor<A, A> {
    private A last;

    public FlowLast(A def) {
        last = def;
    }

    @Override
    public void process(A a) {
        last = a;
    }

    @Override
    public A get() {
        return last;
    }
}

@@ -49,66 +49,8 @@
 s;%0A%0A
-import com.wizzardo.tools.collections.flow.FlowProcessor;%0A
 %0A/**
@@ -138,10 +138,13 @@
 cess
-or
+OnEnd
 %3CA, 
@@ -152,29 +152,8 @@
 %3E %7B%0A
-    private A last;%0A%0A
     
@@ -181,27 +181,29 @@
 ) %7B%0A        
-las
+resul
 t = def;%0A   
@@ -263,79 +263,18 @@
     
-last = a;%0A    %7D%0A%0A    @Override%0A    public A get() %7B%0A        return last
+result = a
 ;%0A  

update 'last'