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

io.descoped.dc.api.PositionObserver Maven / Gradle / Ivy

The newest version!
package io.descoped.dc.api;

import java.util.function.Consumer;

public class PositionObserver {

    private final Consumer expectedCallback;
    private final Consumer completedCallback;

    public PositionObserver(Consumer expectedCallback, Consumer completedCallback) {
        this.expectedCallback = expectedCallback;
        this.completedCallback = completedCallback;
    }

    public void expected(int count) {
        expectedCallback.accept(count);
    }

    public void completed(int count) {
        completedCallback.accept(count);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy