org.oddjob.beanbus
Enum BusPhase

java.lang.Object
  extended by java.lang.Enum<BusPhase>
      extended by org.oddjob.beanbus.BusPhase
All Implemented Interfaces:
Serializable, Comparable<BusPhase>

public enum BusPhase
extends Enum<BusPhase>

Phases of a Bus Journey. Intended to provide more information to BusEvents, not for state logic.

Author:
rob

Enum Constant Summary
BUS_CRASHED
          The bus crashed.
BUS_RUNNING
          The bus is running.
BUS_STARTING
          The bus is starting.
BUS_STOPPED
          The bus isn't running.
BUS_STOPPING
          The bus is stopping.
TRIP_BEGINNING
          A trip is beginning.
TRIP_ENDING
          A trip is intending.
 
Method Summary
static BusPhase valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BusPhase[] 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

BUS_STOPPED

public static final BusPhase BUS_STOPPED
The bus isn't running.


BUS_STARTING

public static final BusPhase BUS_STARTING
The bus is starting.


TRIP_BEGINNING

public static final BusPhase TRIP_BEGINNING
A trip is beginning.


BUS_RUNNING

public static final BusPhase BUS_RUNNING
The bus is running.


TRIP_ENDING

public static final BusPhase TRIP_ENDING
A trip is intending.


BUS_STOPPING

public static final BusPhase BUS_STOPPING
The bus is stopping.


BUS_CRASHED

public static final BusPhase BUS_CRASHED
The bus crashed.

Method Detail

values

public static BusPhase[] 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 (BusPhase c : BusPhase.values())
    System.out.println(c);

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

valueOf

public static BusPhase 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