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