ButtonType
- The type of data for the button to holdpublic class ControlPanel<ButtonType>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ControlPanel.CabinControlPanel
The driver representation for an in-cabin control panel
This class contains linking methods for controlling the cabin in reference to the hardware |
static class |
ControlPanel.FloorControlPanel
The driver representation for an on-landing control panel, having 2x ArrivalIndicator, a FiremanKeyhole, and
Buttons for placing calls
|
static class |
ControlPanel.MaintenanceControlPanel
The driver representation for a maintenance control panel, to keep track of everything The parent list of buttons
represents the floor buttons
|
Constructor and Description |
---|
ControlPanel(java.util.List<Buttons<ButtonType>> buttons,
FiremanKeyhole fireKey)
Creates a control panel comprising a list of buttons and a fire key
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Object> |
flatten()
Flattens this object's components into a single list
|
java.util.List<java.lang.Object> |
getComponents()
The stored list of components of this Component wrapper
|
FiremanKeyhole |
getFireKey()
The mandatory Fireman Keyhole
|
java.util.LinkedList<Buttons<ButtonType>> |
getMainButtonsOnPanel()
A list of all the main-purpose buttons on a control panel.
|
io.elevator.building.Component |
setComponents(java.util.List<java.lang.Object> components)
Sets the stored list of this Component wrapper's components to be the passed param
|
io.elevator.building.Component |
setComponents(java.lang.Object... components)
Sets the stored list of this Component wrapper's components to be the passed params
|
java.lang.String |
toString() |
public ControlPanel(java.util.List<Buttons<ButtonType>> buttons, FiremanKeyhole fireKey)
buttons
- the list of buttons to holdfireKey
- the fire key for this panelpublic final java.util.LinkedList<Buttons<ButtonType>> getMainButtonsOnPanel()
public final FiremanKeyhole getFireKey()
public java.util.List<java.lang.Object> flatten()
public java.lang.String toString()
toString
in class java.lang.Object
public io.elevator.building.Component setComponents(java.lang.Object... components)
components
- The array of components to addpublic io.elevator.building.Component setComponents(java.util.List<java.lang.Object> components)
components
- The list of components to addpublic java.util.List<java.lang.Object> getComponents()