Package org.opentrafficsim.core.network
Enum Class LateralDirectionality
- All Implemented Interfaces:
Serializable,Comparable<LateralDirectionality>,Constable
Directionality in lateral direction. LEFT is the direction to the left of the longitudinal orientation of the GTU, relative
to the forward driving direction. RIGHT is the direction to the right of the longitudinal orientation of the GTU, relative to
the forward driving direction.
Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate$, @version $Revision$, by $Author$, initial version Oct 15, 2014
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<LateralDirectionality>List of LEFT and RIGHT that can be looped over. -
Method Summary
Modifier and TypeMethodDescriptionflip()Returns the other direction.booleanisLeft()Determine whether the direction is the left direction.booleanisNone()Determine whether the lateral direction is not present.booleanisRight()Determine whether the direction is the right direction.static LateralDirectionalityReturns the enum constant of this class with the specified name.static LateralDirectionality[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LEFT
Direction to the left of the longitudinal orientation of the GTU, relative to the forward driving direction. -
RIGHT
Direction to the right of the longitudinal orientation of the GTU, relative to the forward driving direction. -
NONE
Absence of a lateral direction.
-
-
Field Details
-
LEFT_AND_RIGHT
List of LEFT and RIGHT that can be looped over.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isLeft
public boolean isLeft()Determine whether the direction is the left direction.- Returns:
- whether the direction is the left direction
-
isRight
public boolean isRight()Determine whether the direction is the right direction.- Returns:
- whether the direction is the right direction
-
isNone
public boolean isNone()Determine whether the lateral direction is not present.- Returns:
- whether the lateral direction is not present
-
flip
Returns the other direction.- Returns:
- other direction
-