| javax.naming.directory.Attributes
All known Subclasses: javax.naming.directory.BasicAttributes,
Attributes | public interface Attributes extends Cloneable,Serializable(Code) | | This is the interface to a collection of attributes associated with a
directory entry.
This interface defines the methods that are implemented by a collection of a
particular directory entry's attributes.
A directory entry can have zero or more attributes comprising its attributes
collection. The attributes are unordered within the collection. The
attributes can be identified by name. The names of attributes are either case
sensitive or case insensitive as indicated by the isCaseIgnored
method. Method names refer to attribute ID (identity) rather than name, for
brevity.
The attribute collection is created when the directory entry is created.
|
clone | Object clone()(Code) | | Returns a deep copy of this Attributes instance. The
attribute objects are not cloned.
a deep copy of this Attributes instance |
get | Attribute get(String id)(Code) | | Returns the attribute with the specified name (ID). The name is case
insensitive if isCaseIgnored() is true. The return value
is null if no match is found.
Parameters: id - attribute name (ID) the attribute with the specified name (ID) |
getAll | NamingEnumeration<? extends javax.naming.directory.Attribute> getAll()(Code) | | Returns an enumeration containing the zero or more attributes in the
collection. The behaviour of the enumeration is not specified if the
attribute collection is changed.
an enumeration of all contained attributes |
getIDs | NamingEnumeration<String> getIDs()(Code) | | Returns an enumeration containing the zero or more names (IDs) of the
attributes in the collection. The behaviour of the enumeration is not
specified if the attribute collection is changed.
an enumeration of the IDs of all contained attributes |
isCaseIgnored | boolean isCaseIgnored()(Code) | | Indicates whether case is ignored in the names of the attributes.
true if case is ignored, otherwise false |
put | Attribute put(Attribute attribute)(Code) | | Places a non-null attribute in the attribute collection. If there is
already an attribute with the same ID as the new attribute, the old one
is removed from the collection and is returned by this method. If there
was no attribute with the same ID the return value is null .
Parameters: attribute - the attribute to be put the old attribute with the same ID, if exists; otherwisenull |
put | Attribute put(String id, Object obj)(Code) | | Places a new attribute with the supplied ID and value into the attribute
collection. If there is already an attribute with the same ID, the old
one is removed from the collection and is returned by this method. If
there was no attribute with the same ID the return value is
null . The case of the ID is ignored if
isCaseIgnored() is true.
This method provides a mechanism to put an attribute with a
null value: the value of obj may be
null .
Parameters: id - the ID of the new attribute to be put Parameters: obj - the value of the new attribute to be put the old attribute with the same ID, if exists; otherwisenull |
remove | Attribute remove(String id)(Code) | | Removes the attribute with the specified ID. The removed attribute is
returned by this method. If there is no attribute with the specified ID,
the return value is null . The case of the ID is ignored
if isCaseIgnored() is true.
Parameters: id - the ID of the attribute to be removed the removed attribute, if exists; otherwise null |
size | int size()(Code) | | Returns the number of attributes.
the number of attributes |
|
|