java.lang
public static class Thread.State extends Enum<Thread.State>
Represents the current state of a thread, according to the VM rather than the operating system. It can be one of the following:
Since: 1.5
Field Summary | |
---|---|
static Thread.State | BLOCKED |
static Thread.State | NEW |
static Thread.State | RUNNABLE |
static Thread.State | TERMINATED |
static Thread.State | TIMED_WAITING |
static List<Thread.State> | VALUES An immutable list containing the values comprising this enum class in the order they're declared. |
static Thread.State | WAITING |
Method Summary | |
---|---|
List<Thread.State> | family() Returns an immutable list containing the values comprising this enum class in the order they're declared. |
static Thread.State | valueOf(String name) Static factory to return the enum constant pertaining to the given string name. |
for(State c : State.VALUES) System.out.println(c);
VALUES
. Few programmers should have any need to use this method. It is provided for use by sophisticated enum-based data structures to prevent the need for reflective access to VALUES
.Returns: an immutable list containing the values comprising this enum class, in the order they're declared.
Throws: IllegalArgumentException if this enum class has no constant with the specified name.