Enum RollingLaneStructureRecord.RecordLink
java.lang.Object
java.lang.Enum<RollingLaneStructureRecord.RecordLink>
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.RecordLink
- All Implemented Interfaces:
Serializable,Comparable<RollingLaneStructureRecord.RecordLink>,java.lang.constant.Constable
- Enclosing class:
- RollingLaneStructureRecord
public static enum RollingLaneStructureRecord.RecordLink extends Enum<RollingLaneStructureRecord.RecordLink>
Link between records that defines the dependence of start position and hence how this is updated as the GTU moves.
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 22 jan. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description CROSSPart of the current cross-section.DOWNThis record is downstream of the start distance source.LATERAL_ENDThis record is laterally adjacent to the start distance source, and found in an upstream search.LATERAL_STARTThis record is laterally adjacent to the start distance source, and found in a downstream search.UPThis record is upstream of the start distance source. -
Method Summary
Modifier and Type Method Description abstract LengthcalculateStartDistance(RollingLaneStructureRecord startDistanceSource, RollingLaneStructureRecord self, double fractionalPosition)Calculate the start position of this record based on a neighboring source.static RollingLaneStructureRecord.RecordLinkvalueOf(String name)Returns the enum constant of this type with the specified name.static RollingLaneStructureRecord.RecordLink[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UP
This record is upstream of the start distance source. -
DOWN
This record is downstream of the start distance source. -
LATERAL_END
This record is laterally adjacent to the start distance source, and found in an upstream search. -
LATERAL_START
This record is laterally adjacent to the start distance source, and found in a downstream search. -
CROSS
Part of the current cross-section.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
calculateStartDistance
public abstract Length calculateStartDistance(RollingLaneStructureRecord startDistanceSource, RollingLaneStructureRecord self, double fractionalPosition)Calculate the start position of this record based on a neighboring source.- Parameters:
startDistanceSource- RollingLaneStructureRecord; source record in the treeself- RollingLaneStructureRecord; own recordfractionalPosition- double; fractional position on the cross-section- Returns:
- start position of this record based on a neighboring source
-