org.intranet.elevator.model.operate.controller
Class MetaController
java.lang.Object
org.intranet.elevator.model.operate.controller.MetaController
- All Implemented Interfaces:
- Controller
- public class MetaController
- extends java.lang.Object
- implements Controller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
carControllers
private java.util.List carControllers
MetaController
public MetaController()
initialize
public void initialize(EventQueue eQ)
- Specified by:
initialize
in interface Controller
addCar
public void addCar(Car car,
float stoppingDistance)
- Specified by:
addCar
in interface Controller
requestCar
public void requestCar(Floor newFloor,
Direction d)
- Specified by:
requestCar
in interface Controller
findBestCar
private CarController findBestCar(Floor floor,
Direction direction)
toString
public java.lang.String toString()
arrive
public boolean arrive(Car car)
- Description copied from interface:
Controller
- To be called only once when a car arrives at a location. This allows the
controller to update any internal data structures that were keeping track
of where the car was going to.
- Specified by:
arrive
in interface Controller
- Parameters:
car
- The car that is arriving.
- Returns:
- Whether the car is going up after this arrival. Can be used to
set the direction light on the entrance.
setNextDestination
public void setNextDestination(Car car)
- Specified by:
setNextDestination
in interface Controller
getController
private CarController getController(Car car)