|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--FlyCreator
CLASS: FlyCreator
PURPOSE: This class will run as a thread and create fly using FlyManager
based on probabily and the time interval
IMPORT: FlyManager
EXPORT: New Class|FlyCreator
New Method| FlyCreator, run
Field Summary | |
private FlyManager |
fm
FlyManager for adding fly |
private long |
milliSec
The time interval to try to create a fly |
private double |
prob
Probabily of successfully create a fly |
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Constructor Summary | |
FlyCreator(FlyManager flyManager,
double probability,
long interval)
PRE: A valid flyManager object, interval has to be greater than 0 POST: Save all the configuration information |
Method Summary | |
void |
run()
PRE: NONE POST: Infinite loop to try to create fly based on probability and time interval |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private double prob
private long milliSec
private FlyManager fm
Constructor Detail |
public FlyCreator(FlyManager flyManager, double probability, long interval)
Method Detail |
public void run()
run
in class java.lang.Thread
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |