|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.luc.cs.trull.demo.task.Count
public class Count
A simple task that wastes some CPU cycles in each step.
| Field Summary | |
|---|---|
(package private) int |
i
|
(package private) int |
increment
|
(package private) int |
max
|
| Constructor Summary | |
|---|---|
Count(int max)
|
|
Count(int max,
int increment)
|
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the task is still in progress. |
java.lang.Object |
next()
Performs the next discrete step of this task. |
void |
restart()
Reinitializes this task so that it can be performed again. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int i
final int increment
final int max
| Constructor Detail |
|---|
public Count(int max)
public Count(int max,
int increment)
| Method Detail |
|---|
public boolean hasNext()
Tasktrue if the task is still in progress.
hasNext in interface Tasktrue if the task is still in progress.public java.lang.Object next()
Task
next in interface Taskpublic void restart()
Task
restart in interface Task
|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||