public class AttrSet extends Object implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
static AttrSet |
EMPTY_ATTR_SET
Empty Attribute Set.
|
Constructor and Description |
---|
AttrSet()
No argument constructor
|
AttrSet(Attr attr)
Construct attribute set given an attribute
|
AttrSet(Attr[] attrs)
Construct attribute set given an array of attributes.
|
AttrSet(Collection<org.forgerock.opendj.ldap.Attribute> ldapAttrSet)
Construct AttrSet from LDAPAttributeSet
|
Modifier and Type | Method and Description |
---|---|
void |
add(Attr attr)
Add one attribute to the AttrSet The attribute
should have only string values
|
void |
addBinaryAttr(Attr attr)
Add one attribute to the AttrSet The attribute
should have only byte values
|
Object |
clone()
Return a copy of the object
|
boolean |
contains(String attrName)
Check if attrSet has this attribute
|
boolean |
contains(String attrName,
String value)
Check if this attrSet has the attribute with the
given value
|
Attr |
elementAt(int index)
Get the attribute at an index that starts from 0
|
Attr |
getAttribute(String name)
Gets the attribute contained in the set.
|
String[] |
getAttributeNames()
Get names of attributes.
|
Enumeration |
getAttributes()
Enumerate the attributes contained in the attribute
set
|
String |
getValue(String attrName)
Gets the first string value right from a specified
attribute
|
int |
indexOf(String attrName)
Gets the index for an attribute contained in the set
|
void |
remove(String name)
Removes an exisiting attribute
|
void |
remove(String attrName,
String delValue)
Remove a specified value for an attribute in the
set
|
void |
replace(Attr attr)
Replace an existing attribute.
|
int |
size()
Get the number of attributes in the Attribute Set
|
Collection<org.forgerock.opendj.ldap.Attribute> |
toLDAPAttributeSet()
Maps to an LDAPAttributeSet
|
String |
toString()
Retrieves the string representation of an AttrSet
|
public static final AttrSet EMPTY_ATTR_SET
public AttrSet()
public AttrSet(Attr[] attrs)
attrs
- array of attributes to be defined in the attribute setpublic AttrSet(Attr attr)
attr
- attribute to be defined in the attribute setpublic AttrSet(Collection<org.forgerock.opendj.ldap.Attribute> ldapAttrSet)
ldapAttrSet
- LDAP attribute setpublic void add(Attr attr)
attr
- attribute to be added to the setpublic void addBinaryAttr(Attr attr)
attr
- attribute to be added to the setpublic void remove(String name)
name
- attribute to be removedpublic void remove(String attrName, String delValue)
attrName
- attribute name to be looked updelValue
- value to be deleted for the specified attributepublic void replace(Attr attr)
attr
- attribute to be replacedpublic String[] getAttributeNames()
public Attr getAttribute(String name)
name
- name of the attribute to getpublic Enumeration getAttributes()
public String getValue(String attrName)
attrName
- name of the attribute to be queried in the setpublic boolean contains(String attrName)
attrName
- name of the attribute to be checked against the setpublic boolean contains(String attrName, String value)
attrName
- name of the attribute to be checked against the setvalue
- value of the attribute the attribute should containpublic int size()
public Attr elementAt(int index)
public int indexOf(String attrName)
public Object clone()
public Collection<org.forgerock.opendj.ldap.Attribute> toLDAPAttributeSet()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.