interfaces
Interface ControllerForElevator

All Known Implementing Classes:
EmergencyController, ImprovedStupidController, StupidController

public interface ControllerForElevator

The interface defining the methods offered by the controller to the elevator (see ElevatorSpecification)

Version:
1
Author:
J Paul Gibson

Method Summary
 void bindToElevator(ElevatorForController elevator)
          Ensure that the controller is controlling only a single elevator
 Direction calculateDirection()
           
 boolean stopAtNextFloor()
           
 

Method Detail

bindToElevator

void bindToElevator(ElevatorForController elevator)
                    throws java.lang.IllegalArgumentException
Ensure that the controller is controlling only a single elevator

Parameters:
elevator - is the unique elevator to which the controller is now connected
Throws:
java.lang.IllegalArgumentException - if the elevator being connected is null

calculateDirection

Direction calculateDirection()
Returns:
the direction in which the lift should next move

stopAtNextFloor

boolean stopAtNextFloor()
Returns:
whether the lift should stop at the next floor after it has completed its move