fern.simulation.controller
Class AndController

java.lang.Object
  extended by fern.simulation.controller.AndController
All Implemented Interfaces:
SimulationController

public class AndController
extends Object
implements SimulationController

Implements a SimulationController composed of many SimulationController. If one controller tells to stop, the simulation will stop.

Author:
Florian Erhard
See Also:
OrController

Constructor Summary
AndController(SimulationController... controllers)
           
 
Method Summary
 boolean goOn(Simulator sim)
          Returns whether or not to go on with the given simulation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndController

public AndController(SimulationController... controllers)
Method Detail

goOn

public boolean goOn(Simulator sim)
Description copied from interface: SimulationController
Returns whether or not to go on with the given simulation

Specified by:
goOn in interface SimulationController
Parameters:
sim - simulation
Returns:
whether or not to go on