planet.test.timer
Class SimulationTimerTest.TestTimerTask

java.lang.Object
  extended byplanet.util.timer.TimerTaskImpl
      extended byplanet.test.timer.SimulationTimerTest.TestTimerTask
All Implemented Interfaces:
java.io.Serializable, TimerTask
Enclosing class:
SimulationTimerTest

public class SimulationTimerTest.TestTimerTask
extends TimerTaskImpl

Simple TimerTask that only prints the actual step and its name for each invocation of run() method.

Author:
Jordi Pujol Date: 05/05/2004
See Also:
Serialized Form

Constructor Summary
SimulationTimerTest.TestTimerTask(java.lang.String name, boolean periodic)
          Sets the name of this TimerTask.
 
Method Summary
 void run()
          Prints the actual step and the name of this task.
 java.lang.String toString()
          Shows the name of the TimerTask.
 
Methods inherited from class planet.util.timer.TimerTaskImpl
cancel, isFinished
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimulationTimerTest.TestTimerTask

public SimulationTimerTest.TestTimerTask(java.lang.String name,
                                         boolean periodic)
Sets the name of this TimerTask.

Parameters:
name - New name of this TimerTask
periodic - true if this TimerTask is periodic
Method Detail

run

public void run()
Prints the actual step and the name of this task.

Specified by:
run in interface TimerTask
Overrides:
run in class TimerTaskImpl
See Also:
TimerTask.run()

toString

public java.lang.String toString()
Shows the name of the TimerTask.

Returns:
The name of the TimerTask
See Also:
Object.toString()