Package com.cta4j.bus.prediction.model
Enum Class DynamicAction
- All Implemented Interfaces:
Serializable,Comparable<DynamicAction>,Constable
Represents the various dynamic actions that can be applied to a bus trip.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that event has been added to the trip.Indicates that the event or trip has been canceled.Indicates that the trip, which was created dynamically, has been canceled.Indicates that the event or trip has been marked as canceled, but the cancellation should not be shown to the public.Indicates that the event is “drop-off only” and will not stop to pick up passengers.Indicates that the trip has been invalidated.Indicates that the trip, which was created dynamically, has been invalidated.Indicates that the trip was created dynamically and does not appear in the TA schedule.Indicates that no dynamic action has been applied.Indicates one of the following: The trip has been split, and this part of the split is using the original trip identifier(s).Indicates the trip has been split, and this part of the split has been assigned a new trip identifier(s).Indicates that the event or trip will be handled by a different vehicle or operator.Indicates that the time of the event, or the entire trip, has been moved.Indicates that the trip has events that are affected by Disruption Management changes, but the trip itself is not affected.Indicates that the trip, which was created dynamically, has events that are affected by Disruption Management changes, but the trip itself is not affected.Indicates that the trip has been affected by a delay.Indicates that the trip, which was created dynamically, has been affected by a delay. -
Method Summary
Modifier and TypeMethodDescriptionstatic DynamicActionfromCode(int code) Returns theDynamicActioncorresponding to the given code.intgetCode()Gets the code associated with this dynamic action.static DynamicActionReturns the enum constant of this class with the specified name.static DynamicAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Indicates that no dynamic action has been applied. -
CANCELLED
Indicates that the event or trip has been canceled. -
REASSIGNED
Indicates that the event or trip will be handled by a different vehicle or operator. -
SHIFTED
Indicates that the time of the event, or the entire trip, has been moved. -
EXPRESSED
Indicates that the event is “drop-off only” and will not stop to pick up passengers. -
STOPS_AFFECTED
Indicates that the trip has events that are affected by Disruption Management changes, but the trip itself is not affected. -
NEW_TRIP
Indicates that the trip was created dynamically and does not appear in the TA schedule. -
PARTIAL_TRIP
Indicates one of the following:- The trip has been split, and this part of the split is using the original trip identifier(s).
- The trip has been short-turned leading to the removal of short-turned stops from the trip resulting in the trip being partial.
-
PARTIAL_TRIP_NEW
Indicates the trip has been split, and this part of the split has been assigned a new trip identifier(s). -
DELAYED_CANCEL
Indicates that the event or trip has been marked as canceled, but the cancellation should not be shown to the public. -
ADDED_STOP
Indicates that event has been added to the trip. It was not originally scheduled. -
UNKNOWN_DELAY
Indicates that the trip has been affected by a delay. -
UNKNOWN_DELAY_NEW
Indicates that the trip, which was created dynamically, has been affected by a delay. -
INVALIDATED_TRIP
Indicates that the trip has been invalidated. Predictions for it should not be shown to the public. -
INVALIDATED_TRIP_NEW
Indicates that the trip, which was created dynamically, has been invalidated. Predictions for it should not be shown to the public. -
CANCELLED_TRIP_NEW
Indicates that the trip, which was created dynamically, has been canceled. -
STOPS_AFFECTED_NEW
Indicates that the trip, which was created dynamically, has events that are affected by Disruption Management changes, but the trip itself is not affected.
-
-
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 dynamic action.- Returns:
- the dynamic action code
-
fromCode
Returns theDynamicActioncorresponding to the given code.- Parameters:
code- the dynamic action code- Returns:
- the corresponding
DynamicAction - Throws:
IllegalArgumentException- if the code does not correspond to any known dynamic action
-