2015-09-07 11:44:36 -06:00
|
|
|
|
// concurrency/IntGenerator.java
|
2015-06-15 17:47:35 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
|
|
|
|
|
|
|
|
|
public abstract class IntGenerator {
|
|
|
|
|
private volatile boolean canceled = false;
|
|
|
|
|
public abstract int next();
|
|
|
|
|
// Allow this to be canceled:
|
|
|
|
|
public void cancel() { canceled = true; }
|
|
|
|
|
public boolean isCanceled() { return canceled; }
|
2015-09-07 11:44:36 -06:00
|
|
|
|
}
|