cz.cuni.amis.pogamut.base.component.controller
Enum ComponentState

java.lang.Object
  extended by java.lang.Enum<ComponentState>
      extended by cz.cuni.amis.pogamut.base.component.controller.ComponentState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ComponentState>

public enum ComponentState
extends java.lang.Enum<ComponentState>


Enum Constant Summary
INSTANTIATED
           
KILLED
           
KILLING
           
PAUSED
           
PAUSING
           
RESETED
           
RESETTING
           
RESUMING
           
RUNNING
           
STARTING
           
STARTING_PAUSED
           
STOPPED
           
STOPPING
           
 
Method Summary
static boolean inside(ComponentState state, ComponentState... inside)
          Tests whether 'state' is inside 'inside'.
static boolean notInside(ComponentState state, ComponentState... inside)
          Wether 'state' is not part of 'inside'.
static boolean partOf(ComponentState[] states, ComponentState... inside)
          Returns true if one state from 'states' is found 'inside', O(n) complexity.
static ComponentState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ComponentState[] 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

INSTANTIATED

public static final ComponentState INSTANTIATED

STARTING

public static final ComponentState STARTING

STARTING_PAUSED

public static final ComponentState STARTING_PAUSED

RUNNING

public static final ComponentState RUNNING

PAUSING

public static final ComponentState PAUSING

PAUSED

public static final ComponentState PAUSED

RESUMING

public static final ComponentState RESUMING

STOPPING

public static final ComponentState STOPPING

STOPPED

public static final ComponentState STOPPED

KILLING

public static final ComponentState KILLING

KILLED

public static final ComponentState KILLED

RESETTING

public static final ComponentState RESETTING

RESETED

public static final ComponentState RESETED
Method Detail

values

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

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

valueOf

public static ComponentState valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

inside

public static boolean inside(ComponentState state,
                             ComponentState... inside)
Tests whether 'state' is inside 'inside'.

Parameters:
state -
inside -
Returns:

partOf

public static boolean partOf(ComponentState[] states,
                             ComponentState... inside)
Returns true if one state from 'states' is found 'inside', O(n) complexity.

Parameters:
states -
inside -
Returns:

notInside

public static boolean notInside(ComponentState state,
                                ComponentState... inside)
Wether 'state' is not part of 'inside'.

Parameters:
state -
inside -
Returns: