Class LaneChangeInfo
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.tactical.routesystem.LaneChangeInfo
-
- All Implemented Interfaces:
Comparable<LaneChangeInfo>
public class LaneChangeInfo extends Object implements Comparable<LaneChangeInfo>
Lane change info.Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 7 nov. 2019
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Constructor Summary
Constructors Constructor Description LaneChangeInfo(int n, Length remainingDistance, boolean deadEnd, LateralDirectionality lat)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LaneChangeInfo o)
boolean
deadEnd()
Returns whether the need to change lane comes from a dead-end.LateralDirectionality
getLateralDirectionality()
Returns the lateral directionality of the required lane changes.int
getNumberOfLaneChanges()
Returns the required number of lane changes.Length
getRemainingDistance()
Return the remaining distance.
-
-
-
Constructor Detail
-
LaneChangeInfo
public LaneChangeInfo(int n, Length remainingDistance, boolean deadEnd, LateralDirectionality lat)
Constructor.- Parameters:
n
- int; required number of lane changesremainingDistance
- Length; remaining distancedeadEnd
- boolean; whether the need to change lane comes from a dead-endlat
- LateralDirectionality; lateral directionality of required lane changes
-
-
Method Detail
-
getNumberOfLaneChanges
public int getNumberOfLaneChanges()
Returns the required number of lane changes.- Returns:
- int; required number of lane changes
-
getRemainingDistance
public Length getRemainingDistance()
Return the remaining distance.- Returns:
- Length; remaining distance
-
deadEnd
public boolean deadEnd()
Returns whether the need to change lane comes from a dead-end.- Returns:
- boolean; whether the need to change lane comes from a dead-end
-
getLateralDirectionality
public final LateralDirectionality getLateralDirectionality()
Returns the lateral directionality of the required lane changes.- Returns:
- LateralDirectionality; lateral directionality of the required lane changes
-
compareTo
public int compareTo(LaneChangeInfo o)
- Specified by:
compareTo
in interfaceComparable<LaneChangeInfo>
-
-