org.intranet.elevator.model.operate.controller
Class CarController
java.lang.Object
org.intranet.elevator.model.operate.controller.CarController
- public class CarController
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
car
private final Car car
stoppingDistance
private final float stoppingDistance
assignments
private final CarAssignments assignments
CarController
public CarController(Car c,
float stoppingDist)
getCar
Car getCar()
getDestination
Floor getDestination()
getCost
float getCost(Floor floor,
Direction destinationDirection)
getNearestBase
private Assignment getNearestBase()
- The nearest base is the nearest floor we could reasonably stop at.
createFloorContexts
private java.util.Iterator createFloorContexts(java.util.List floors,
Direction carDirection)
- Parameters:
floors
- carDirection
-
addDestination
void addDestination(Floor d,
Direction direction)
arrive
public boolean arrive()
setNextDestination
public void setNextDestination()