public class VisualizerTask
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Object>
Instance of this class represents tasks to be enqueued in the update queue of the BaseApplication
and
processed concurrently during the simple update loop.
Constructor and Description |
---|
VisualizerTask(java.util.concurrent.Callable<java.lang.Object> task,
long cycle)
Constructs a task to be executed.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
call() |
long |
getCycle()
Gets the cycle number of this task
|
public VisualizerTask(java.util.concurrent.Callable<java.lang.Object> task, long cycle)
task
- a Callable
to be executed in the BaseApplication
update loopcycle
- the cycle number of the simulation relative to this taskpublic java.lang.Object call() throws java.lang.Exception
call
in interface java.util.concurrent.Callable<java.lang.Object>
java.lang.Exception
public long getCycle()