Adds a single component to the end of this LDAP name.
comp | The non-null component to add. |
InvalidNameException | If adding comp at end of the name would violate the name's syntax. |
Adds a single component at a specified position within this LDAP name. Components of this LDAP name at or after the index (if any) of the new component are shifted up by one (away from index 0) to accommodate the new component.
posn | The index at which to add the new component. Must be in the range [0,size()]. | |
comp | The non-null component to add. |
InvalidNameException | If adding comp at the specified position would violate the name's syntax. |
Adds the components of a name -- in order -- to the end of this name.
suffix | The non-null components to add. |
InvalidNameException | if suffix is not a valid LDAP name, or if the addition of the components would violate the syntax rules of this LDAP name. |
Adds the components of a name -- in order -- at a specified position within this name. Components of this LDAP name at or after the index (if any) of the first new component are shifted up (away from index 0) to accommodate the new components.
posn | The index at which to add the new component. Must be in the range [0,size()]. | |
suffix | The non-null components to add. |
InvalidNameException | if suffix is not a valid LDAP name, or if the addition of the components would violate the syntax rules of this LDAP name. |
Compares this LdapName with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Name is less than, equal to, or greater than the given Object.
If obj is null or not an instance of LdapName, ClassCastException is thrown.
Ordering of LDAP names follows the lexicographical rules for
string comparison, with the extension that this applies to all
the RDNs in the LDAP name. All the RDNs are lined up in their
specified order and compared lexicographically.
See Rdn.compareTo(Object obj)
for RDN comparison rules.
If this LDAP name is lexicographically lesser than obj, a negative number is returned. If this LDAP name is lexicographically greater than obj, a positive number is returned.
obj | The non-null LdapName instance to compare against. |
Determines whether this LDAP name ends with a specified LDAP name suffix. A name n is a suffix if it is equal to getSuffix(size()-n.size())--in other words this LDAP name ends with 'n'. If n is null or not a RFC2253 formatted name as described in the class description, false is returned.
n | The LDAP name to check. |
getSuffix(int posn)
Retrieves a component of this LDAP name as a string.
posn | The 0-based index of the component to retrieve. Must be in the range [0,size()). |
Retrieves the components of this name as an enumeration of strings. The effect of updates to this name on this enumeration is undefined. If the name has zero components, an empty (non-null) enumeration is returned. The order of the components returned by the enumeration is same as the order in which the components are numbered as described in the class description.
Creates a name whose components consist of a prefix of the components of this LDAP name. Subsequent changes to this name will not affect the name that is returned and vice versa.
posn | The 0-based index of the component at which to stop. Must be in the range [0,size()]. |
Creates a name whose components consist of a suffix of the components in this LDAP name. Subsequent changes to this name do not affect the name that is returned and vice versa.
posn | The 0-based index of the component at which to start. Must be in the range [0,size()]. |
Determines whether this LDAP name is empty. An empty name is one with zero components.
Removes a component from this LDAP name. The component of this name at the specified position is removed. Components with indexes greater than this position (if any) are shifted down (toward index 0) by one.
posn | The index of the component to remove. Must be in the range [0,size()). |
InvalidNameException | if deleting the component would violate the syntax rules of the name. |
Retrieves the number of components in this LDAP name.
Determines whether this LDAP name starts with a specified LDAP name prefix. A name n is a prefix if it is equal to getPrefix(n.size())--in other words this LDAP name starts with 'n'. If n is null or not a RFC2253 formatted name as described in the class description, false is returned.
n | The LDAP name to check. |
getPrefix(int posn)
Diagram: Name