public class LDAPAttributeSet
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
| Constructor and Description |
|---|
LDAPAttributeSet()
Constructs a new set of attributes.
|
LDAPAttributeSet(LDAPAttribute[] attrArray)
Constructs an attribute set.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(LDAPAttribute attr)
Adds the specified attribute to this attribute set.
|
void |
add(LDAPAttribute attr,
boolean isAllowAttrValueSameCase)
Adds the specified attribute to this attribute set.
|
java.lang.Object |
clone() |
java.lang.Object |
deepClone() |
LDAPAttribute |
getAttribute(java.lang.String attrName)
Returns a single attribute that exactly matches the specified attribute
name.
|
javax.naming.NamingEnumeration<LDAPAttribute> |
getAttributes()
Returns an enumeration of the attributes in this attribute set IN ORIGINAL ORDER.
|
LDAPAttribute[] |
getAttributesArray() |
LDAPAttribute[] |
getAttributesArray(boolean typesOnly) |
void |
remove(java.lang.String name)
Removes the specified attribute from the set.
|
void |
replace(LDAPAttribute attr)
replace existing attr (found by attr name) with new value.
|
void |
setAttributes(LDAPAttribute[] attrArray) |
int |
size()
Returns the number of attributes in this set.
|
java.lang.String |
toString()
Retrieves the string representation of all attributes in the attribute
set.
|
public LDAPAttributeSet()
public LDAPAttributeSet(LDAPAttribute[] attrArray)
attrs - the list of attributespublic void setAttributes(LDAPAttribute[] attrArray)
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.Object deepClone()
public javax.naming.NamingEnumeration<LDAPAttribute> getAttributes()
public LDAPAttribute[] getAttributesArray()
public LDAPAttribute[] getAttributesArray(boolean typesOnly)
public LDAPAttribute getAttribute(java.lang.String attrName)
attrName - name of attribute to return
For example:
"cn" // Only a non-subtyped version of cn
"cn;lang-ja" // Only a Japanese version of cn
LDAPAttributepublic int size()
public void add(LDAPAttribute attr)
attr - attribute to add to this setpublic void add(LDAPAttribute attr, boolean isAllowAttrValueSameCase)
attr - attribute to add to this setpublic void remove(java.lang.String name)
name - name of the attribute to removepublic void replace(LDAPAttribute attr)
name - name of the attribute to removepublic java.lang.String toString()
LDAPAttributeSet: LDAPAttribute {type='cn', values='Barbara Jensen,Babs
Jensen'}LDAPAttribute {type='sn', values='Jensen'}LDAPAttribute {type='
givenname', values='Barbara'}LDAPAttribute {type='objectclass', values=
'top,person,organizationalPerson,inetOrgPerson'}LDAPAttribute {type='ou',
values='Product Development,People'}
toString in class java.lang.Object