Class FixedTimeController.Flank
- java.lang.Object
-
- org.opentrafficsim.trafficcontrol.FixedTimeController.Flank
-
- All Implemented Interfaces:
Comparable<FixedTimeController.Flank>
- Enclosing class:
- FixedTimeController
class FixedTimeController.Flank extends Object implements Comparable<FixedTimeController.Flank>
Storage of an offset within a cycle and the new traffic light color. Used to sort the flanks.
-
-
Constructor Summary
Constructors Constructor Description Flank(double offset, TrafficLightColor newColor)
Construct a new Flank.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FixedTimeController.Flank o)
double
getOffset()
Retrieve the offset.TrafficLightColor
getTrafficLightColor()
Retrieve the color after this transition.String
toString()
-
-
-
Constructor Detail
-
Flank
Flank(double offset, TrafficLightColor newColor)
Construct a new Flank.- Parameters:
offset
- double; offset within the cycle timenewColor
- TrafficLightColor; color to show after this transition
-
-
Method Detail
-
getOffset
public double getOffset()
Retrieve the offset.- Returns:
- double; the offset
-
getTrafficLightColor
public TrafficLightColor getTrafficLightColor()
Retrieve the color after this transition.- Returns:
- TrafficLightColor; the color after this transition
-
compareTo
public int compareTo(FixedTimeController.Flank o)
- Specified by:
compareTo
in interfaceComparable<FixedTimeController.Flank>
-
-