public enum ThreadSource extends Enum<ThreadSource> implements Enumeration
Enum Constant and Description |
---|
NEW_THREAD
The brand new thread is created and used.
|
THREAD_POOL
The thread is recruited from the thread pool.
|
Modifier and Type | Method and Description |
---|---|
static ThreadSource |
getDefault()
Get the enum constant that is considered to be the default.
|
static ThreadSource |
getFromValue(int value)
Get the enum constant that is associated with the given numeric value.
|
int |
getValue()
Get the numeric value associated with this enum constant.
|
static ThreadSource |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ThreadSource[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadSource THREAD_POOL
public static final ThreadSource NEW_THREAD
public static ThreadSource[] values()
for (ThreadSource c : ThreadSource.values()) System.out.println(c);
public static ThreadSource valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getValue()
getValue
in interface Enumeration
@Nonnull public static ThreadSource getFromValue(int value)
value
- a numeric value.@Nonnull public static ThreadSource getDefault()