Package com.cta4j.bus.prediction.model
Enum Class FlagStop
- All Implemented Interfaces:
Serializable,Comparable<FlagStop>,Constable
Represents the flag-stop information for a prediction.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates a normal stop.Indicates a stop where only discharging of passengers occurs.Indicates a stop where passengers are both picked up and discharged.Indicates that no flag-stop information is available. -
Method Summary
Modifier and TypeMethodDescriptionstatic FlagStopfromCode(int code) Returns theFlagStopcorresponding to the given code.intgetCode()Gets the code associated with this flag-stop.static FlagStopReturns the enum constant of this class with the specified name.static FlagStop[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNDEFINED
Indicates that no flag-stop information is available. -
NORMAL
Indicates a normal stop. -
PICKUP_AND_DISCHARGE
Indicates a stop where passengers are both picked up and discharged. -
ONLY_DISCHARGE
Indicates a stop where only discharging of passengers occurs.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getCode
public int getCode()Gets the code associated with this flag-stop.- Returns:
- the flag-stop code
-
fromCode
Returns theFlagStopcorresponding 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
-