Class LDAPModificationSet
java.lang.Object
com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPModificationSet
- All Implemented Interfaces:
Serializable
@NotExtensible
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public class LDAPModificationSet
extends Object
implements Serializable
This class provides a data structure that represents a set of LDAP
modifications.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, an array or collection of
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, an array or collection of
Modification objects should be used instead.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int op, LDAPAttribute attr) Adds a modification to this modification set.elementAt(int index) Retrieves the LDAP modification at the specified position in this modification set.voidRemoves the first LDAP modification in this set targeting the specified attribute.voidremoveElementAt(int index) Removes the LDAP modification at the specified position in this modification set.intsize()Retrieves the number of modifications in this modification set.toArray()Retrieves the contents of this set as an array of LDAP modifications.toString()Retrieves a string representation of this modification set.
-
Constructor Details
-
LDAPModificationSet
public LDAPModificationSet()Creates an empty set of modifications.
-
-
Method Details
-
add
Adds a modification to this modification set.- Parameters:
op- The modification type for the modification.attr- The attribute for the modification.
-
elementAt
Retrieves the LDAP modification at the specified position in this modification set.- Parameters:
index- The position of the LDAP modification to retrieve.- Returns:
- The requested modification.
- Throws:
IndexOutOfBoundsException- If the provided index is invalid.
-
removeElementAt
Removes the LDAP modification at the specified position in this modification set.- Parameters:
index- The position of the LDAP modification to remove.- Throws:
IndexOutOfBoundsException- If the provided index is invalid.
-
remove
Removes the first LDAP modification in this set targeting the specified attribute.- Parameters:
name- The name of the attribute to remove.
-
size
Retrieves the number of modifications in this modification set.- Returns:
- The number of modifications in this modification set.
-
toArray
Retrieves the contents of this set as an array of LDAP modifications.- Returns:
- An array of the LDAP modifications contained in this set.
-
toString
Retrieves a string representation of this modification set.
-