Is this a good OO design, assuming you want each inheriting class to be an infinite stream? Any better / more elegant way to do a similar thing?
public abstract class Base implements Runnable {
protected abstract void doSomething();
public void run() {
while ( true ) {
Thread.sleep(1000);
doSomething();
}
}
}
source
share