org.scijava.thread
Enum ThreadService.ThreadContext

java.lang.Object
  extended by java.lang.Enum<ThreadService.ThreadContext>
      extended by 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
NONE
          The thread was not spawned via a SciJava thread service, and its Context is unknown or inapplicable.
OTHER
          The thread was spawned by a SciJava thread service, but not this one; i.e., it belongs to a different Context.
SAME
          The thread was spawned by this thread service; i.e., it belongs to the same Context.
 
Method Summary
static ThreadService.ThreadContext valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SAME

public static final ThreadService.ThreadContext SAME
The thread was spawned by this thread service; i.e., it belongs to the same Context.


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 different Context.


NONE

public static final ThreadService.ThreadContext NONE
The thread was not spawned via a SciJava thread service, and its Context is 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 name
NullPointerException - if the argument is null


Copyright © 2009–2015 SciJava. All rights reserved.