org.oddjob.state
Enum StateConditions

java.lang.Object
  extended by java.lang.Enum<StateConditions>
      extended by org.oddjob.state.StateConditions
All Implemented Interfaces:
Serializable, Comparable<StateConditions>, StateCondition

public enum StateConditions
extends Enum<StateConditions>
implements StateCondition

These are drop in replacements for jobs that used to use a JobStates for conditions.

Author:
Rob Gordon

Nested Class Summary
static class StateConditions.Conversions
           
 
Enum Constant Summary
COMPLETE
          Is a job complete?
DESTROYED
          The job has been destroyed.
EXCEPTION
          Is a job in an exception state?
EXECUTING
          Is a job executing or otherwise active?
INCOMPLETE
          Is a job incomplete?
READY
          Is a job ready?
 
Method Summary
static StateConditions valueOf(String name)
          Returns the enum constant of this type with the specified name.
static StateConditions[] 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
 
Methods inherited from interface org.oddjob.state.StateCondition
test
 

Enum Constant Detail

READY

public static final StateConditions READY
Is a job ready?


EXECUTING

public static final StateConditions EXECUTING
Is a job executing or otherwise active?


INCOMPLETE

public static final StateConditions INCOMPLETE
Is a job incomplete?


COMPLETE

public static final StateConditions COMPLETE
Is a job complete?


EXCEPTION

public static final StateConditions EXCEPTION
Is a job in an exception state?


DESTROYED

public static final StateConditions DESTROYED
The job has been destroyed. It can no longer be used.

Method Detail

values

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

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

valueOf

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