Enum ModificationOperation
- java.lang.Object
-
- java.lang.Enum<ModificationOperation>
-
- org.apache.directory.api.ldap.model.entry.ModificationOperation
-
- All Implemented Interfaces:
Serializable
,Comparable<ModificationOperation>
public enum ModificationOperation extends Enum<ModificationOperation>
An enum storing the different modification operation which can be used in a Modification. There is a one to one mapping with the DirContext.ADD_ATTRIBUTE, DirContext.REMOVE_ATTRIBUTE, DirContext.REPLACE_ATTRIBUTE. We have added the INCREMENT operation (RFC 4525)- Author:
- Apache Directory Project
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_ATTRIBUTE
Added attribute valueINCREMENT_ATTRIBUTE
Increment operation, RFC 4525REMOVE_ATTRIBUTE
Removed attribute valueREPLACE_ATTRIBUTE
Replaced attribute value
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ModificationOperation
getOperation(int value)
Get the ModificationOperation from an int valueint
getValue()
String
toString()
static ModificationOperation
valueOf(String name)
Returns the enum constant of this type with the specified name.static ModificationOperation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADD_ATTRIBUTE
public static final ModificationOperation ADD_ATTRIBUTE
Added attribute value
-
REMOVE_ATTRIBUTE
public static final ModificationOperation REMOVE_ATTRIBUTE
Removed attribute value
-
REPLACE_ATTRIBUTE
public static final ModificationOperation REPLACE_ATTRIBUTE
Replaced attribute value
-
INCREMENT_ATTRIBUTE
public static final ModificationOperation INCREMENT_ATTRIBUTE
Increment operation, RFC 4525
-
-
Method Detail
-
values
public static ModificationOperation[] 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 (ModificationOperation c : ModificationOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModificationOperation 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
-
getValue
public int getValue()
- Returns:
- The integer value associated with the element. This value is equivalent to the one found in DirContext.
-
getOperation
public static ModificationOperation getOperation(int value)
Get the ModificationOperation from an int value- Parameters:
value
- the ModificationOperation int value- Returns:
- the associated ModifciationOperation instance
-
toString
public String toString()
- Overrides:
toString
in classEnum<ModificationOperation>
- See Also:
Object.toString()
-
-