10 lines
273 B
Java
10 lines
273 B
Java
// concurrency/IntSupplier.java
|
|
|
|
public abstract class IntSupplier {
|
|
private volatile boolean canceled = false;
|
|
public abstract int next();
|
|
// Allow this to be canceled:
|
|
public void cancel() { canceled = true; }
|
|
public boolean isCanceled() { return canceled; }
|
|
}
|