public class LdapAttribute extends BasicAttribute
BasicAttribute to add support for
options as defined in RFC2849.
While uncommon, options can be used to specify additional descriptors for
the attribute. Options are backed by a HashSet of
String.
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
options
Holds the attributes options.
|
attrID, ordered, values| Constructor and Description |
|---|
LdapAttribute(String id)
Creates an unordered attribute with the specified ID.
|
LdapAttribute(String id,
boolean ordered)
Creates an attribute with the specified ID whose values may be ordered.
|
LdapAttribute(String id,
Collection<String> options,
boolean ordered)
Creates an attribute with the specified ID and options whose values may be ordered.
|
LdapAttribute(String id,
Object value)
Creates an unordered attribute with the specified ID and value.
|
LdapAttribute(String id,
Object value,
boolean ordered)
Creates an attribute with the specified ID and value whose values may be ordered.
|
LdapAttribute(String id,
Object value,
Collection<String> options)
Creates an unordered attribute with the specified ID, value, and options.
|
LdapAttribute(String id,
Object value,
Collection<String> options,
boolean ordered)
Creates an attribute with the specified ID, value, and options whose values may be ordered.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAllOptions(Collection<String> options)
Add all values in the collection to the options.
|
boolean |
addOption(String option)
Add an option.
|
void |
clearOptions()
Clears all stored options.
|
boolean |
contains(String option)
Checks for existence of a particular option on the set.
|
boolean |
containsAll(Collection<String> options)
Checks for existence of a series of options on the set.
|
Set<String> |
getOptions()
Get options.
|
boolean |
hasOptions()
Tests for the presence of options.
|
boolean |
removeAllOptions(Collection<String> options)
Removes all options listed in the supplied set.
|
boolean |
removeOption(String option)
Removes an option from the the set.
|
boolean |
retainAllOptions(Collection<String> options)
Removes any options not on the set of supplied options.
|
void |
setOptions(Set<String> options)
Set options.
|
public LdapAttribute(String id)
id - String ID of the attribute.public LdapAttribute(String id, Object value)
id - String ID of the attribute.value - Attribute value.public LdapAttribute(String id, Object value, Collection<String> options)
id - String ID of the attribute.value - Attribute value.options - Collection of String attribute options.public LdapAttribute(String id, boolean ordered)
id - String ID of the attribute.ordered - boolean indicating whether or not the attributes values are ordered.public LdapAttribute(String id, Collection<String> options, boolean ordered)
id - String ID of the attribute.options - Collection of String attribute options.ordered - boolean indicating whether or not the attributes values are ordered.public LdapAttribute(String id, Object value, boolean ordered)
id - String ID of the attribute.value - Attribute value.ordered - boolean indicating whether or not the attributes values are ordered.public LdapAttribute(String id, Object value, Collection<String> options, boolean ordered)
id - String ID of the attribute.value - Attribute value.options - Collection of String attribute options.ordered - boolean indicating whether or not the attributes values are ordered.public boolean addOption(String option)
option - String option.public boolean addAllOptions(Collection<String> options)
options - Collection of String values.public void clearOptions()
public boolean contains(String option)
option - String option.public boolean containsAll(Collection<String> options)
options - Collection of String options.public boolean hasOptions()
public boolean removeOption(String option)
option - String option.public boolean removeAllOptions(Collection<String> options)
options - Collection of String options.public boolean retainAllOptions(Collection<String> options)
options - Collection of String options.