|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A set of controls that can be used by an elevator controller.
| Method Summary | |
void |
closeDoors(int elevator)
Close an elevator's doors. |
void |
finish()
Call when the elevator controller is finished. |
int |
getFloor(int elevator)
Return the current location of the elevator. |
ElevatorEvent |
getNextEvent()
Return the next event in the event queue. |
int |
getNumElevators()
Return the number of elevators in the elevator bank. |
int |
getNumFloors()
Return the number of floors in the elevator bank. |
boolean |
moveTo(int floor,
int elevator)
Move an elevator to another floor. |
void |
openDoors(int elevator)
Open an elevator's doors. |
void |
setDirectionDisplay(int elevator,
int direction)
Set which direction the elevator bank will show for this elevator's display. |
void |
setInterruptHandler(Runnable handler)
Set the elevator interrupt handler. |
| Method Detail |
public int getNumFloors()
public int getNumElevators()
public void setInterruptHandler(Runnable handler)
handler - the elevator interrupt handler.public void openDoors(int elevator)
elevator - which elevator's doors to open.public void closeDoors(int elevator)
elevator - which elevator's doors to close.
public boolean moveTo(int floor,
int elevator)
floor - the floor to move to.elevator - the elevator to move.public int getFloor(int elevator)
elevator - the elevator to locate.
public void setDirectionDisplay(int elevator,
int direction)
elevator - the elevator whose direction display to set.direction - the direction to show (up, down, or neither).public void finish()
public ElevatorEvent getNextEvent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||