Package org.ddolib.examples.layered.alp
Class RunwayState
java.lang.Object
org.ddolib.examples.layered.alp.RunwayState
- All Implemented Interfaces:
Comparable<RunwayState>
State of a runway : last landing time and last aircraft's class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRunwayState(int prevClass, int prevTime) Creates a new runway state.RunwayState(RunwayState other) Creates a copy of the given runway state. -
Method Summary
-
Field Details
-
prevTime
public int prevTimeThe previous landing time on this runway. -
prevClass
public int prevClassThe class of the previous aircraft that landed on this runway.
-
-
Constructor Details
-
RunwayState
public RunwayState(int prevClass, int prevTime) Creates a new runway state.- Parameters:
prevClass- the class of the previous aircraft that landedprevTime- the previous landing time
-
RunwayState
Creates a copy of the given runway state.- Parameters:
other- the runway state to copy
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<RunwayState>
-
toString
-
equals
-
hashCode
public int hashCode()
-