sopra
Class Timer
java.lang.Object
|
+--java.util.Observable
|
+--sopra.Timer
- All Implemented Interfaces:
- java.lang.Runnable
- public class Timer
- extends java.util.Observable
- implements java.lang.Runnable
Field Summary |
private static Timer |
exemplar
Exemplar des Timers (es darf nur eines geben) |
private int |
sleepTime
Zeitdauer in ms, welche der Timer schlafen soll |
private java.lang.Thread |
thread
Thread, der aktiv ist |
Fields inherited from class java.util.Observable |
|
Constructor Summary |
private |
Timer(int aSleepTime)
|
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
exemplar
private static Timer exemplar
- Exemplar des Timers (es darf nur eines geben)
sleepTime
private int sleepTime
- Zeitdauer in ms, welche der Timer schlafen soll
thread
private java.lang.Thread thread
- Thread, der aktiv ist
Timer
private Timer(int aSleepTime)
start
public static Timer start(int aSleepTime)
sleepTime
private void sleepTime(int anInteger)
sleepTime
private int sleepTime()
notifyObservers
public void notifyObservers()
- Overrides:
notifyObservers
in class java.util.Observable
run
public void run()
- Specified by:
run
in interface java.lang.Runnable