Enum Class Direction

java.lang.Object
java.lang.Enum<Direction>
dev.hloth.zgztransport.Direction
All Implemented Interfaces:
Serializable, Comparable<Direction>, Constable

public enum Direction extends Enum<Direction>
Direction of a journey along its route, byte 8 of a transaction: the operator GTFS direction_id plus one.
  • Enum Constant Details

    • ONE

      public static final Direction ONE
      Byte 01; south on the tram.
    • TWO

      public static final Direction TWO
      Byte 02; north on the tram.
  • Method Details

    • values

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

      public static Direction valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • value

      public int value()
      The byte the card stores.
      Returns:
      1 or 2
    • ofValue

      public static Direction ofValue(int value)
      The direction a byte stands for.
      Parameters:
      value - the byte
      Returns:
      the direction
      Throws:
      CardFormatException - if the byte is neither 1 nor 2