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;
    }
}

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


/**
 * Created by wizzardo on 16.04.16.
 */
public class FlowLast<A> extends FlowProcessOnEnd<A, A> {
    public FlowLast(A def) {
        result = def;
    }

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

update 'last'