com.newisys.eventsim
Enum ThreadState

java.lang.Object
  extended by java.lang.Enum<ThreadState>
      extended by com.newisys.eventsim.ThreadState
All Implemented Interfaces:
Serializable, Comparable<ThreadState>

public enum ThreadState
extends Enum<ThreadState>

Describes the state of a simulation thread.


Enum Constant Summary
BLOCKED
          Thread is waiting for an event.
MARSHALLING
          Thread is waiting for the scheduler thread to complete a marshalled call.
PENDING
          Thread is ready and waiting for its turn to run.
RUNNING
          Thread is currently running.
STARTING
          Thread is waiting to be started.
TERMINATED
          Thread has completed execution.
 
Method Summary
static ThreadState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ThreadState[] values()
          Returns an array containing the constants of this enum type, in the order they're 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

STARTING

public static final ThreadState STARTING
Thread is waiting to be started.


PENDING

public static final ThreadState PENDING
Thread is ready and waiting for its turn to run.


RUNNING

public static final ThreadState RUNNING
Thread is currently running.


MARSHALLING

public static final ThreadState MARSHALLING
Thread is waiting for the scheduler thread to complete a marshalled call.


BLOCKED

public static final ThreadState BLOCKED
Thread is waiting for an event.


TERMINATED

public static final ThreadState TERMINATED
Thread has completed execution.

Method Detail

values

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

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

valueOf

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