Firefish 0.5.10

gov.lbl.dsd.firefish.util
Class KeyedTimerTask

java.lang.Object
  extended bygov.lbl.dsd.firefish.util.TimerTask
      extended bygov.lbl.dsd.firefish.util.KeyedTimerTask
All Implemented Interfaces:
Runnable

public class KeyedTimerTask
extends TimerTask

A task for HashMaps; Comparison for equality is by a given key; to be executed by a Timer at a scheduled time.


Constructor Summary
KeyedTimerTask(Object key, Object reason)
          Constructor for KeyedTimerTask.
 
Method Summary
 boolean equals(Object other)
           
 int hashCode()
           
static void main(String[] args)
          Just to test a bit.
 void run()
          Override this method in subclasses for custom behaviour.
 String toString()
          Returns a String representation of the receiver.
 
Methods inherited from class gov.lbl.dsd.firefish.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyedTimerTask

public KeyedTimerTask(Object key,
                      Object reason)
Constructor for KeyedTimerTask.

Method Detail

run

public void run()
Override this method in subclasses for custom behaviour.

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

hashCode

public int hashCode()

equals

public boolean equals(Object other)

toString

public String toString()
Returns a String representation of the receiver.


main

public static void main(String[] args)
                 throws Exception
Just to test a bit. Should only run the task with "reason2" (the other gets canceled).

Throws:
Exception

Firefish 0.5.10

Jump to the Firefish Homepage