org.intranet.elevator.model.operate.controller
Class CarController

java.lang.Object
  extended byorg.intranet.elevator.model.operate.controller.CarController

public class CarController
extends java.lang.Object


Field Summary
private  CarAssignments assignments
           
private  Car car
           
private  float stoppingDistance
           
 
Constructor Summary
CarController(Car c, float stoppingDist)
           
 
Method Summary
(package private)  void addDestination(Floor d, Direction direction)
           
 boolean arrive()
           
private  java.util.Iterator createFloorContexts(java.util.List floors, Direction carDirection)
           
(package private)  Car getCar()
           
(package private)  float getCost(Floor floor, Direction destinationDirection)
           
(package private)  Floor getDestination()
           
private  Assignment getNearestBase()
          The nearest base is the nearest floor we could reasonably stop at.
 void setNextDestination()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

car

private final Car car

stoppingDistance

private final float stoppingDistance

assignments

private final CarAssignments assignments
Constructor Detail

CarController

public CarController(Car c,
                     float stoppingDist)
Method Detail

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()