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>
- 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-2022 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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CROSS
Part of the current cross-section.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.UP
This record is upstream of the start distance source.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Length
calculateStartDistance(RollingLaneStructureRecord startDistanceSource, RollingLaneStructureRecord self, double fractionalPosition)
Calculate the start position of this record based on a neighboring source.static RollingLaneStructureRecord.RecordLink
valueOf(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 Detail
-
UP
public static final RollingLaneStructureRecord.RecordLink UP
This record is upstream of the start distance source.
-
DOWN
public static final RollingLaneStructureRecord.RecordLink DOWN
This record is downstream of the start distance source.
-
LATERAL_END
public static final RollingLaneStructureRecord.RecordLink LATERAL_END
This record is laterally adjacent to the start distance source, and found in an upstream search.
-
LATERAL_START
public static final RollingLaneStructureRecord.RecordLink LATERAL_START
This record is laterally adjacent to the start distance source, and found in a downstream search.
-
CROSS
public static final RollingLaneStructureRecord.RecordLink CROSS
Part of the current cross-section.
-
-
Method Detail
-
values
public static RollingLaneStructureRecord.RecordLink[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RollingLaneStructureRecord.RecordLink c : RollingLaneStructureRecord.RecordLink.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RollingLaneStructureRecord.RecordLink valueOf(String name)
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
-
-