@NotExtensible @Mutable @ThreadSafety(level=NOT_THREADSAFE) public class LDAPAttribute extends java.lang.Object implements java.io.Serializable
Attribute class should
 be used instead.| Constructor and Description | 
|---|
| LDAPAttribute(Attribute attr)Creates a new LDAP attribute from the provided  Attributeobject. | 
| LDAPAttribute(LDAPAttribute attr)Creates a new LDAP attribute that is a duplicate of the provided attribute. | 
| LDAPAttribute(java.lang.String attrName)Creates a new LDAP attribute with the specified name and no values. | 
| LDAPAttribute(java.lang.String attrName,
             byte[] attrBytes)Creates a new LDAP attribute with the specified name and value. | 
| LDAPAttribute(java.lang.String attrName,
             java.lang.String attrString)Creates a new LDAP attribute with the specified name and value. | 
| LDAPAttribute(java.lang.String attrName,
             java.lang.String[] attrStrings)Creates a new LDAP attribute with the specified name and values. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addValue(byte[] attrBytes)Adds the provided value to the set of values for this attribute. | 
| void | addValue(java.lang.String attrString)Adds the provided value to the set of values for this attribute. | 
| java.lang.String | getBaseName()Retrieves the base name for this attribute, without any options. | 
| static java.lang.String | getBaseName(java.lang.String attrName)Retrieves the base name for the attribute with the provided name. | 
| byte[][] | getByteValueArray()Retrieves an array of the values for this attribute. | 
| java.util.Enumeration<byte[]> | getByteValues()Retrieves an enumeration over the binary values for this attribute. | 
| java.lang.String | getLangSubtype()Retrieves the language subtype (i.e., the attribute option which begins
 with "lang-") for this attribute, if present. | 
| java.lang.String | getName()Retrieves the name for this attribute. | 
| java.lang.String[] | getStringValueArray()Retrieves an array of the values for this attribute. | 
| java.util.Enumeration<java.lang.String> | getStringValues()Retrieves an enumeration over the string values for this attribute. | 
| java.lang.String[] | getSubtypes()Retrieves the subtypes (i.e., attribute options) contained in the name for
 this attribute. | 
| static java.lang.String[] | getSubtypes(java.lang.String attrName)Retrieves the subtypes (i.e., attribute options) contained in the provided
 attribute name. | 
| boolean | hasSubtype(java.lang.String subtype)Indicates whether this attribute contains the specified subtype. | 
| boolean | hasSubtypes(java.lang.String[] subtypes)Indicates whether this attribute contains all of the specified subtypes. | 
| void | removeValue(byte[] attrValue)Removes the provided value from this attribute. | 
| void | removeValue(java.lang.String attrValue)Removes the provided value from this attribute. | 
| int | size()Retrieves the number of values for this attribute. | 
| Attribute | toAttribute()Converts this LDAP attribute to an  Attributeobject. | 
| java.lang.String | toString()Retrieves a string representation of this LDAP attribute. | 
public LDAPAttribute(@NotNull Attribute attr)
Attribute object.attr - The LDAP attribute to use to create this attribute.public LDAPAttribute(@NotNull LDAPAttribute attr)
attr - The LDAP attribute to use to create this attribute.public LDAPAttribute(@NotNull java.lang.String attrName)
attrName - The name for this attribute.public LDAPAttribute(@NotNull java.lang.String attrName, @NotNull byte[] attrBytes)
attrName - The name for this attribute.attrBytes - The value for this attribute.public LDAPAttribute(@NotNull java.lang.String attrName, @NotNull java.lang.String attrString)
attrName - The name for this attribute.attrString - The value for this attribute.public LDAPAttribute(@NotNull java.lang.String attrName, @NotNull java.lang.String[] attrStrings)
attrName - The name for this attribute.attrStrings - The values for this attribute.@NotNull public java.lang.String getName()
@NotNull public java.lang.String getBaseName()
@NotNull public static java.lang.String getBaseName(@NotNull java.lang.String attrName)
attrName - The attribute name for which to retrieve the base name.@Nullable public java.lang.String[] getSubtypes()
null if there are none.@Nullable public static java.lang.String[] getSubtypes(@NotNull java.lang.String attrName)
attrName - The attribute name from which to extract the subtypes.null if there are none.@Nullable public java.lang.String getLangSubtype()
null if there
          is none.public boolean hasSubtype(@NotNull java.lang.String subtype)
subtype - The subtype for which to make the determination.true if this option has the specified subtype, or
          false if not.public boolean hasSubtypes(@NotNull java.lang.String[] subtypes)
subtypes - The subtypes for which to make the determination.true if this option has all of the specified subtypes, or
          false if not.@NotNull public java.util.Enumeration<java.lang.String> getStringValues()
@NotNull public java.lang.String[] getStringValueArray()
@NotNull public java.util.Enumeration<byte[]> getByteValues()
@NotNull public byte[][] getByteValueArray()
public void addValue(@NotNull java.lang.String attrString)
attrString - The value to add to this attribute.public void addValue(@NotNull byte[] attrBytes)
attrBytes - The value to add to this attribute.public void removeValue(@NotNull java.lang.String attrValue)
attrValue - The value to remove.public void removeValue(@NotNull byte[] attrValue)
attrValue - The value to remove.public int size()
@NotNull public final Attribute toAttribute()
Attribute object.Attribute object which corresponds to this LDAP
          attribute.