Class ElevatorState
java.lang.Object
org.simplesim.examples.elevator.shared.ElevatorState
- All Implemented Interfaces:
State
Class containing all relevant variables of the elevator state
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToQueue
(int floor, Request request) int
getArrivals
(int floor) int
getButton
(int floor) getCabin()
int
int
int
getQueue
(int floor) void
pressButton
(int floor, int value) void
removeFromQueue
(int floor, Request request) void
setArrivals
(int floor, int value) void
setButton
(int floor, int value) void
setCurrentFloor
(int value) void
setDestinationFloor
(int value) void
setDirection
(int value)
-
Constructor Details
-
ElevatorState
public ElevatorState()
-
-
Method Details
-
getCurrentFloor
public int getCurrentFloor() -
setCurrentFloor
public void setCurrentFloor(int value) -
getDestinationFloor
public int getDestinationFloor() -
setDestinationFloor
public void setDestinationFloor(int value) -
getCabin
-
getQueue
-
getDirection
public int getDirection() -
setDirection
public void setDirection(int value) -
getArrivals
public int getArrivals(int floor) -
setArrivals
public void setArrivals(int floor, int value) -
getButton
public int getButton(int floor) -
setButton
public void setButton(int floor, int value) -
pressButton
public void pressButton(int floor, int value)
-