tp
Enum LM.LockType

java.lang.Object
  extended by java.lang.Enum<LM.LockType>
      extended by tp.LM.LockType
All Implemented Interfaces:
Serializable, Comparable<LM.LockType>
Enclosing interface:
LM

public static enum LM.LockType
extends Enum<LM.LockType>


Enum Constant Summary
READ
           
UNDEF
           
WRITE
           
 
Method Summary
 boolean conflicts(LM.LockType current)
          check whether current lock type conflicts to this lock type
 boolean isCompatible(LM.LockType current)
          check whether current lock type is compatible with this lock type
 boolean subsume(LM.LockType other)
          check whether this lock type subsumes (is stronger) other lock type
static LM.LockType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LM.LockType[] 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

UNDEF

public static final LM.LockType UNDEF

READ

public static final LM.LockType READ

WRITE

public static final LM.LockType WRITE
Method Detail

values

public static LM.LockType[] 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 (LM.LockType c : LM.LockType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LM.LockType 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

isCompatible

public boolean isCompatible(LM.LockType current)
check whether current lock type is compatible with this lock type

Parameters:
current - type of lock currently held
Returns:
true if the two locks are compatible.

conflicts

public boolean conflicts(LM.LockType current)
check whether current lock type conflicts to this lock type

Parameters:
current - type of lock currently held
Returns:
true if the two locks conflicts.

subsume

public boolean subsume(LM.LockType other)
check whether this lock type subsumes (is stronger) other lock type

Parameters:
other -
Returns:
true if this lock type is stronger than other