com.calitha.concurrent
Enum RWLock.Type
java.lang.Object
java.lang.Enum<RWLock.Type>
com.calitha.concurrent.RWLock.Type
- All Implemented Interfaces:
- Serializable, Comparable<RWLock.Type>
- Enclosing class:
- RWLock
public static enum RWLock.Type
- extends Enum<RWLock.Type>
Type of the Lock. None, read or write.
|
Method Summary |
static RWLock.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static RWLock.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
NONE
public static final RWLock.Type NONE
READ
public static final RWLock.Type READ
WRITE
public static final RWLock.Type WRITE
values
public static RWLock.Type[] 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 (RWLock.Type c : RWLock.Type.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static RWLock.Type 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