Enum LateralDirectionality

java.lang.Object
java.lang.Enum<LateralDirectionality>
org.opentrafficsim.core.network.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-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

$LastChangedDate: 2019-01-06 01:35:05 +0100 (Sun, 06 Jan 2019) $, @version $Revision: 4831 $, by $Author: averbraeck $, initial version Oct 15, 2014

Author:
Alexander Verbraeck, Peter Knoppers
  • Enum Constant Details

    • LEFT

      public static final LateralDirectionality LEFT
      Direction to the left of the longitudinal orientation of the GTU, relative to the forward driving direction.
    • RIGHT

      public static final LateralDirectionality RIGHT
      Direction to the right of the longitudinal orientation of the GTU, relative to the forward driving direction.
    • NONE

      public static final LateralDirectionality NONE
      Absence of a lateral direction.
  • Method Details

    • values

      public static LateralDirectionality[] 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

      public static LateralDirectionality 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 name
      NullPointerException - 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

      public LateralDirectionality flip()
      Returns the other direction.
      Returns:
      other direction