org.onebusaway.realtime.api
public enum EVehiclePhase extends Enum<EVehiclePhase>
Enum Constant and Description |
---|
AT_BASE
We're at a transit base
|
DEADHEAD_AFTER
Non-revenue from the end of a block back to the transit base
|
DEADHEAD_BEFORE
Non-revenue travel to the start of a block or trip
|
DEADHEAD_DURING
Non-revenue travel between trip segments of a block
|
IN_PROGRESS
The vehicle is actively serving a block
|
LAYOVER_AFTER
A pause after a vehicle has completed its block
|
LAYOVER_BEFORE
A pause before a block starts
|
LAYOVER_DURING
A pause before a block starts or between trip segments
|
UNKNOWN
The vehicle is doing something unexpected
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isActiveAfterBlock(EVehiclePhase phase) |
static boolean |
isActiveBeforeBlock(EVehiclePhase phase) |
static boolean |
isActiveDuringBlock(EVehiclePhase phase) |
static boolean |
isActiveLayover(EVehiclePhase phase) |
static boolean |
isLayover(EVehiclePhase phase) |
String |
toLabel() |
static EVehiclePhase |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EVehiclePhase[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EVehiclePhase AT_BASE
public static final EVehiclePhase DEADHEAD_BEFORE
public static final EVehiclePhase LAYOVER_BEFORE
public static final EVehiclePhase IN_PROGRESS
public static final EVehiclePhase DEADHEAD_DURING
public static final EVehiclePhase LAYOVER_DURING
public static final EVehiclePhase DEADHEAD_AFTER
public static final EVehiclePhase LAYOVER_AFTER
public static final EVehiclePhase UNKNOWN
public static EVehiclePhase[] values()
for (EVehiclePhase c : EVehiclePhase.values()) System.out.println(c);
public static EVehiclePhase valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static boolean isActiveBeforeBlock(EVehiclePhase phase)
public static boolean isActiveDuringBlock(EVehiclePhase phase)
public static boolean isActiveAfterBlock(EVehiclePhase phase)
public static boolean isActiveLayover(EVehiclePhase phase)
public static boolean isLayover(EVehiclePhase phase)
public String toLabel()
Copyright © 2014 OneBusAway. All Rights Reserved.