Enum LateralDirectionality

  • All Implemented Interfaces:
    Serializable, Comparable<LateralDirectionality>

    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-2022 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
    • Enum Constant Detail

      • 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.
    • Method Detail

      • values

        public static LateralDirectionality[] 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 (LateralDirectionality c : LateralDirectionality.values())
            System.out.println(c);
        
        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