org.opends.server.types
Enum ModificationType

java.lang.Object
  extended by java.lang.Enum<ModificationType>
      extended by org.opends.server.types.ModificationType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ModificationType>

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
public enum ModificationType
extends java.lang.Enum<ModificationType>

This enumeration defines the set of possible modification types that may be used for an attribute modification. This is based on the LDAP specification defined in RFC 2251.


Enum Constant Summary
ADD
          The modification type that indicates that the associated attribute values should be added to the entry.
DELETE
          The modification type that indicates that the associated attribute or set of values should be removed from the entry.
INCREMENT
          The modification type that indicates that the value of the associated attribute should be incremented by a specified amount as defined in RFC 4525.
REPLACE
          The modification type that indicates that the associated attribute should be used to replace any existing values for that attribute in the entry.
 
Method Summary
 java.lang.String getLDIFName()
          Retrieves the name of this modification type as it should appear in LDIF records.
 int intValue()
          Retrieves the integer value for this modification type.
 java.lang.String toString()
          Retrieves a string representation of this modification type.
static ModificationType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ModificationType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADD

public static final ModificationType ADD
The modification type that indicates that the associated attribute values should be added to the entry.


DELETE

public static final ModificationType DELETE
The modification type that indicates that the associated attribute or set of values should be removed from the entry.


REPLACE

public static final ModificationType REPLACE
The modification type that indicates that the associated attribute should be used to replace any existing values for that attribute in the entry.


INCREMENT

public static final ModificationType INCREMENT
The modification type that indicates that the value of the associated attribute should be incremented by a specified amount as defined in RFC 4525.

Method Detail

values

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

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

valueOf

public static ModificationType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

intValue

public int intValue()
Retrieves the integer value for this modification type.

Returns:
The integer value for this modification type.

getLDIFName

public java.lang.String getLDIFName()
Retrieves the name of this modification type as it should appear in LDIF records.

Returns:
The name of this modification type as it should appear in LDIF records.

toString

public java.lang.String toString()
Retrieves a string representation of this modification type.

Overrides:
toString in class java.lang.Enum<ModificationType>
Returns:
A string representation of this modification type.