|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElevatorForController
The interface provided by the Elevator to the Controller allowing it to read the current
state of the elevator system
(see ElevatorSpecification
)
Method Summary | |
---|---|
Direction |
currentDirection()
|
int |
currentFloor()
|
boolean |
downPressedAtFloor(int floor)
Permits elevator controller to see if a request to go down has been made at a specified floor |
boolean |
floorPressedInElevator(int floor)
Permits elevator controller to see if there is a request to a particular floor |
boolean |
noMoreRequestsAbove(int floor)
|
boolean |
noMoreRequestsBelow(int floor)
|
int |
topFloor()
|
boolean |
upPressedAtFloor(int floor)
Permits elevator controller to see if a request to go up has been made at a specified floor |
Method Detail |
---|
Direction currentDirection()
int currentFloor()
boolean downPressedAtFloor(int floor) throws java.lang.IllegalArgumentException
floor
- specifies the floor at which the request is being checked
java.lang.IllegalArgumentException
- if the floor is not valid (from 1.. NUMBER_OF_FLOORS-1)boolean floorPressedInElevator(int floor) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the number of floors specified is not in rangeboolean noMoreRequestsAbove(int floor) throws java.lang.IllegalArgumentException
floor
-
java.lang.IllegalArgumentException
- if the number of floors specified is not in rangeboolean noMoreRequestsBelow(int floor) throws java.lang.IllegalArgumentException
floor
-
java.lang.IllegalArgumentException
- if the number of floors specified is not in rangeint topFloor()
boolean upPressedAtFloor(int floor) throws java.lang.IllegalArgumentException
floor
- specifies the floor at which the request is being checked
java.lang.IllegalArgumentException
- if the floor is not valid (from 0.. NUMBER_OF_FLOORS-2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |