|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.lmu.liftor.Place.PlaceImpl
|
+--edu.lmu.liftor.Elevator
An Elevator is a special kind of place that moves among Landings.
| Nested Class Summary | |
static class |
Elevator.Landing
A part of a floor that an Elevator may interact with. |
| Nested classes inherited from class edu.lmu.liftor.Place |
Place.PlaceFullException, Place.PlaceImpl |
| Field Summary | |
static int |
BOARDING_DELAY
How long the elevator waits for people to board and exit. |
Building |
building
What building this elevator is in. |
static int |
DEFAULT_ELEVATOR_CAPACITY
This is the maximum capacity of the elevators |
static int |
MOVEMENT_DELAY
How long it takes to move to a floor. |
| Fields inherited from interface edu.lmu.liftor.Place |
LIMBO |
| Constructor Summary | |
Elevator(Building where,
java.util.List landings)
Construct a new elevator in the given building with the given list of landings. |
|
| Method Summary | |
Floor |
getCurrentFloor()
Get the floor that this elevator is currently at. |
boolean |
isGoingUp()
Is this elevator going up? |
void |
notifyPassengersOfArrival(Elevator.Landing l)
|
void |
pushButton(Floor floor)
|
void |
run()
This is the runner! It runs and runs and never gets tired. |
void |
start()
|
java.lang.String |
toString()
|
void |
waitForFloor(Floor f)
Wait for a specific floor to be reached. |
Floor |
waitForNextFloor()
Wait for any floor to be reached by the elevator. |
| Methods inherited from class edu.lmu.liftor.Place.PlaceImpl |
enter, exit, getPlaceCapacity, getPlaceName, getVisitorCount, isFull |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public final Building building
public static final int DEFAULT_ELEVATOR_CAPACITY
public static final int MOVEMENT_DELAY
public static final int BOARDING_DELAY
| Constructor Detail |
public Elevator(Building where,
java.util.List landings)
| Method Detail |
public boolean isGoingUp()
public void pushButton(Floor floor)
public void run()
run in interface java.lang.Runnablepublic Floor getCurrentFloor()
public void waitForFloor(Floor f)
public void notifyPassengersOfArrival(Elevator.Landing l)
public Floor waitForNextFloor()
public void start()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||