interfaces
Interface ElevatorForUsers

All Known Subinterfaces:
ElevatorSpecification
All Known Implementing Classes:
Elevator

public interface ElevatorForUsers

The interface offered by the elevator to the users (see ElevatorSpecification)

Version:
1
Author:
J Paul Gibson

Method Summary
 boolean downPressedAtFloor(int floor)
          Permits elevator users to see if a request to go down has been made at a specified floor
 boolean floorPressedInElevator(int floor)
          Permits elevator users inside the elevator to see if there is a request to a particular floor
 void pressDown(int floor)
          Permits elevator users to request elevator to take them down
 void pressFloorInElevator(int floor)
          Permits elevator users inside the elevator to request elevator to take them to a particular floor
 void pressUp(int floor)
          Permits elevator users to request elevator to take them up
 boolean upPressedAtFloor(int floor)
          Permits elevator users to see if a request to go up has been made at a specified floor
 

Method Detail

downPressedAtFloor

boolean downPressedAtFloor(int floor)
                           throws java.lang.IllegalArgumentException
Permits elevator users to see if a request to go down has been made at a specified floor

Parameters:
floor - specifies the floor at which the request is being checked
Throws:
java.lang.IllegalArgumentException - if the floor is not valid (from 1.. NUMBER_OF_FLOORS-1)

floorPressedInElevator

boolean floorPressedInElevator(int floor)
                               throws java.lang.IllegalArgumentException
Permits elevator users inside the elevator to see if there is a request to a particular floor

Returns:
Whether there is currently a request to go to the specified floor (inside the elevator)
Throws:
java.lang.IllegalArgumentException - if the number of floors specified is not in range

pressDown

void pressDown(int floor)
               throws java.lang.IllegalArgumentException
Permits elevator users to request elevator to take them down

Parameters:
floor - specifies the floor at which the down request is made
Throws:
java.lang.IllegalArgumentException - if the floor is not valid (from 1.. NUMBER_OF_FLOORS-1)

pressFloorInElevator

void pressFloorInElevator(int floor)
                          throws java.lang.IllegalArgumentException
Permits elevator users inside the elevator to request elevator to take them to a particular floor

Parameters:
floor -
Throws:
java.lang.IllegalArgumentException - if the number of floors specified is not in range

pressUp

void pressUp(int floor)
             throws java.lang.IllegalArgumentException
Permits elevator users to request elevator to take them up

Parameters:
floor - specifies the floor at which the up request is made
Throws:
java.lang.IllegalArgumentException - if the floor is not valid (from 0.. NUMBER_OF_FLOORS-2)

upPressedAtFloor

boolean upPressedAtFloor(int floor)
                         throws java.lang.IllegalArgumentException
Permits elevator users to see if a request to go up has been made at a specified floor

Parameters:
floor - specifies the floor at which the request is being checked
Throws:
java.lang.IllegalArgumentException - if the floor is not valid (from 0.. NUMBER_OF_FLOORS-2)