Package org.opentrafficsim.core.network
Enum LateralDirectionality
- All Implemented Interfaces:
Serializable,Comparable<LateralDirectionality>,java.lang.constant.Constable
public enum LateralDirectionality extends Enum<LateralDirectionality>
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-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2020-01-23 11:14:19 +0100 (Thu, 23 Jan 2020) $, @version $Revision: 6010 $, by $Author: averbraeck $,
initial version Oct 15, 2014
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description LEFTDirection to the left of the longitudinal orientation of the GTU, relative to the forward driving direction.NONEAbsence of a lateral direction.RIGHTDirection to the right of the longitudinal orientation of the GTU, relative to the forward driving direction. -
Method Summary
Modifier and Type Method Description LateralDirectionalityflip()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 LateralDirectionalityvalueOf(String name)Returns the enum constant of this type with the specified name.static LateralDirectionality[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
-
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
-