Enum LateralDirectionality

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LateralDirectionality>

    public enum LateralDirectionality
    extends java.lang.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
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      LEFT
      Direction to the left of the longitudinal orientation of the GTU, relative to the forward driving direction.
      NONE
      Absence of a lateral direction.
      RIGHT
      Direction to the right of the longitudinal orientation of the GTU, relative to the forward driving direction.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LateralDirectionality flip()
      Returns the other direction.
      boolean isLeft()
      Determine whether the direction is the left direction.
      boolean isNone()
      Determine whether the lateral direction is not present.
      boolean isRight()
      Determine whether the direction is the right direction.
      static LateralDirectionality valueOf​(java.lang.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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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