Enum Class FlagStop

java.lang.Object
java.lang.Enum<FlagStop>
com.cta4j.bus.prediction.model.FlagStop
All Implemented Interfaces:
Serializable, Comparable<FlagStop>, Constable

public enum FlagStop extends Enum<FlagStop>
Represents the flag-stop information for a prediction.
  • Enum Constant Details

    • UNDEFINED

      public static final FlagStop UNDEFINED
      Indicates that no flag-stop information is available.
    • NORMAL

      public static final FlagStop NORMAL
      Indicates a normal stop.
    • PICKUP_AND_DISCHARGE

      public static final FlagStop PICKUP_AND_DISCHARGE
      Indicates a stop where passengers are both picked up and discharged.
    • ONLY_DISCHARGE

      public static final FlagStop ONLY_DISCHARGE
      Indicates a stop where only discharging of passengers occurs.
  • Method Details

    • values

      public static FlagStop[] 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 FlagStop 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
    • getCode

      public int getCode()
      Gets the code associated with this flag-stop.
      Returns:
      the flag-stop code
    • fromCode

      public static FlagStop fromCode(int code)
      Returns the FlagStop corresponding to the given code.
      Parameters:
      code - the flag-stop code
      Returns:
      the corresponding FlagStop
      Throws:
      IllegalArgumentException - if the code does not correspond to any known flag-stop