Cancels this timer task. If the task has been scheduled for one-time execution and has not yet run, or has not yet been scheduled, it will never run. If the task has been scheduled for repeated execution, it will never run again. (If the task is running when this call occurs, the task will run to completion, but will never run again.)
Note that calling this method from within the EventListener.handleEvent(Event)
method of a repeating timer task absolutely guarantees that the timer task will not run again.
This method may be called repeatedly; the second and subsequent calls have no effect.
Note: documentation copied (and slightly modified) from java.util.TimerTask.cancel()
.
@return true if this task is scheduled for one-time execution and hasnot yet run, or this task is scheduled for repeated execution. Returns false if the task was scheduled for one-time execution and has already run, or if the task was never scheduled, or if the task was already cancelled. (Loosely speaking, this method returns
true if it prevents one or more scheduled executions from taking place.)