Package org.scijava.thread
Enum ThreadService.ThreadContext
- java.lang.Object
-
- java.lang.Enum<ThreadService.ThreadContext>
-
- org.scijava.thread.ThreadService.ThreadContext
-
- All Implemented Interfaces:
Serializable,Comparable<ThreadService.ThreadContext>
- Enclosing interface:
- ThreadService
public static enum ThreadService.ThreadContext extends Enum<ThreadService.ThreadContext>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NONEThe thread was not spawned via a SciJava thread service, and itsContextis unknown or inapplicable.OTHERThe thread was spawned by a SciJava thread service, but not this one; i.e., it belongs to a differentContext.SAMEThe thread was spawned by this thread service; i.e., it belongs to the sameContext.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ThreadService.ThreadContextvalueOf(String name)Returns the enum constant of this type with the specified name.static ThreadService.ThreadContext[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SAME
public static final ThreadService.ThreadContext SAME
The thread was spawned by this thread service; i.e., it belongs to the sameContext.
-
OTHER
public static final ThreadService.ThreadContext OTHER
The thread was spawned by a SciJava thread service, but not this one; i.e., it belongs to a differentContext.
-
NONE
public static final ThreadService.ThreadContext NONE
The thread was not spawned via a SciJava thread service, and itsContextis unknown or inapplicable.
-
-
Method Detail
-
values
public static ThreadService.ThreadContext[] 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 (ThreadService.ThreadContext c : ThreadService.ThreadContext.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ThreadService.ThreadContext 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 nameNullPointerException- if the argument is null
-
-