org.onebusaway.realtime.api
Enum EVehiclePhase

java.lang.Object
  extended by java.lang.Enum<EVehiclePhase>
      extended by org.onebusaway.realtime.api.EVehiclePhase
All Implemented Interfaces:
Serializable, Comparable<EVehiclePhase>

public enum EVehiclePhase
extends Enum<EVehiclePhase>


Enum Constant Summary
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
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AT_BASE

public static final EVehiclePhase AT_BASE
We're at a transit base


DEADHEAD_BEFORE

public static final EVehiclePhase DEADHEAD_BEFORE
Non-revenue travel to the start of a block or trip


LAYOVER_BEFORE

public static final EVehiclePhase LAYOVER_BEFORE
A pause before a block starts


IN_PROGRESS

public static final EVehiclePhase IN_PROGRESS
The vehicle is actively serving a block


DEADHEAD_DURING

public static final EVehiclePhase DEADHEAD_DURING
Non-revenue travel between trip segments of a block


LAYOVER_DURING

public static final EVehiclePhase LAYOVER_DURING
A pause before a block starts or between trip segments


DEADHEAD_AFTER

public static final EVehiclePhase DEADHEAD_AFTER
Non-revenue from the end of a block back to the transit base


LAYOVER_AFTER

public static final EVehiclePhase LAYOVER_AFTER
A pause after a vehicle has completed its block


UNKNOWN

public static final EVehiclePhase UNKNOWN
The vehicle is doing something unexpected

Method Detail

values

public static EVehiclePhase[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EVehiclePhase c : EVehiclePhase.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EVehiclePhase valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

isActiveBeforeBlock

public static boolean isActiveBeforeBlock(EVehiclePhase phase)

isActiveDuringBlock

public static boolean isActiveDuringBlock(EVehiclePhase phase)

isActiveAfterBlock

public static boolean isActiveAfterBlock(EVehiclePhase phase)

isActiveLayover

public static boolean isActiveLayover(EVehiclePhase phase)

isLayover

public static boolean isLayover(EVehiclePhase phase)

toLabel

public String toLabel()


Copyright © 2012 OneBusAway. All Rights Reserved.