|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.simulation.controller.DefaultController
public class DefaultController
The probably most common implementation of an SimulationController
. It
causes the simulation to stop, after a given moment in time is crossed.
Constructor Summary | |
---|---|
DefaultController(double maxTime)
Creates the controller for a given time where the simulation has to stop. |
Method Summary | |
---|---|
double |
getTime()
Gets the time where the simulation has to stop. |
boolean |
goOn(Simulator sim)
Returns whether or not to go on with the given simulation |
void |
setTime(double time)
Sets the time where the simulation has to stop. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultController(double maxTime)
maxTime
- the moment in time where to stop the simulationMethod Detail |
---|
public boolean goOn(Simulator sim)
SimulationController
goOn
in interface SimulationController
sim
- simulation
public void setTime(double time)
time
- the moment in time where to stop the simulationpublic double getTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |