public class DefaultController extends Object implements SimulationController
SimulationController. It causes the
simulation to stop, after a given moment in time is crossed.| Constructor and Description |
|---|
DefaultController(double maxTime)
Creates the controller for a given time where the simulation has to stop.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public DefaultController(double maxTime)
maxTime - the moment in time where to stop the simulationpublic boolean goOn(Simulator sim)
SimulationControllergoOn in interface SimulationControllersim - simulationpublic void setTime(double time)
time - the moment in time where to stop the simulationpublic double getTime()
Copyright © 2007–2021. All rights reserved.