Greetings. If you haven't noticed my post count yet, I'm new.
So I'm trying to manage a Timer that has a bunch of TimerTasks scheduled to it, and then lets them run free. However, it seems that the Timer needs to be updated, and the easiest way I figured to do that was scrap the old one and create a new one: complete with new TimerTasks. The hard part comes around when I try to use another Timer dedicated to destroying and rebuilding the main Timer. Here's the code, with the unimportant parts stripped out:
Here is the error it spits out at me:
So now onto my questions. I could either fix what causes this error (I haven't a clue as to how) or use another scheduling system to recreate the Timer. Which one would be easier, and where should I start?
Herrington Argyle wrote:What exactly would that look like?
Methods that override other methods look exactly like the methods they override. -- Try saying that three times
That is, they have the same method signature (name and parameters). I'm a little rusty on this stuff so somebody may have to step in to correct me but if I recall correctly, you can access variables in the block/class that surrounds an inner class but the variables have to be marked final which means the inner class can't change it.
The best ideas are the crazy ones. If you have a crazy idea and it works, it's really valuable.—Kent Beck