All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.savl.ripple.client.async.ComposedOperation Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.savl.ripple.client.async;

abstract public class ComposedOperation {
    public T1 first;
    public T2 second;
    public T3 third;
    public T4 fourth;

    protected abstract void finished();
    protected abstract int numOps();

    int done = 0;

    private void doneOne() {
        if (++done == numOps()) {
            finished();
        }
    }
    public void first(T1 pfirst) {
        first = pfirst;
        doneOne();
    }

    public void second(T2 psecond) {
        second = psecond;
        doneOne();
    }

    public void third(T3 pthird) {
        third = pthird;
        doneOne();
    }

    public void fourth(T4 pfourth) {
        fourth = pfourth;
        doneOne();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy