com.googlecode.sarasvati
Enum ProcessState

java.lang.Object
  extended by java.lang.Enum<ProcessState>
      extended by com.googlecode.sarasvati.ProcessState
All Implemented Interfaces:
Serializable, Comparable<ProcessState>

public enum ProcessState
extends Enum<ProcessState>

Contains the valid states that a GraphProcess may have.

Author:
Paul Lorenz

Enum Constant Summary
Canceled
          GraphProcess has been canceled.
Completed
          GraphProcess has been completed.
Created
          GraphProcess has been created, but has not yet been started.
Executing
          GraphProcess has been started and contains active tokens, either node tokens or arc tokens or both.
PendingCancel
          GraphProcess has been scheduled for cancellation.
PendingCompletion
          GraphProcess has no active tokens and is in the process of being completed.
 
Method Summary
static ProcessState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ProcessState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Created

public static final ProcessState Created
GraphProcess has been created, but has not yet been started. It contains no tokens.


Executing

public static final ProcessState Executing
GraphProcess has been started and contains active tokens, either node tokens or arc tokens or both.


PendingCompletion

public static final ProcessState PendingCompletion
GraphProcess has no active tokens and is in the process of being completed.


Completed

public static final ProcessState Completed
GraphProcess has been completed. It has no active tokens.


PendingCancel

public static final ProcessState PendingCancel
GraphProcess has been scheduled for cancellation. It may have active tokens, but no further action will be taken with those tokens.


Canceled

public static final ProcessState Canceled
GraphProcess has been canceled. It may have active tokens but no further action will be taken with those tokens.

Method Detail

values

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

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

valueOf

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