OnJava8-Examples/lowlevel/IntTestable.java

15 lines
400 B
Java
Raw Normal View History

2017-01-15 16:00:44 -08:00
// lowlevel/IntTestable.java
// (c)2021 MindView LLC: see Copyright.txt
2017-01-15 16:00:44 -08:00
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import java.util.function.*;
public abstract class
IntTestable implements Runnable, IntSupplier {
abstract void evenIncrement();
@Override public void run() {
2017-01-15 16:00:44 -08:00
while(true)
evenIncrement();
}
}