Interface: javax.naming.directory.Attributes
- public interface Attributes
- extends Cloneable, Serializable
In a directory, named objects can have associated with them attributes. The Attributes interface represents a collection of attributes. For example, you can request from the directory the attributes associated with an object. Those attributes are returned in an object that implements the Attributes interface.
Attributes in an object that implements the Attributes interface are unordered. The object can have zero or more attributes. Attributes is either case-sensitive or case-insensitive (case-ignore). This property is determined at the time the Attributes object is created. (see BasicAttributes constructor for example). In a case-insensitive Attributes, the case of its attribute identifiers is ignored when searching for an attribute, or adding attributes. In a case-sensitive Attributes, the case is significant.
Note that updates to Attributes (such as adding or removing an attribute) do not affect the corresponding representation in the directory. Updates to the directory can only be effected using operations in the DirContext interface.
Methods
-
clonetop
public Object clone()Makes a copy of the attribute set. The new set contains the same attributes as the original set: the attributes are not themselves cloned. Changes to the copy will not affect the original and vice versa. -
gettop
Retrieves the attribute with the given attribute id from the attribute set. -
getAlltop
public NamingEnumeration<? extends Attribute> getAll()Retrieves an enumeration of the attributes in the attribute set. The effects of updates to this attribute set on this enumeration are undefined. -
getIDstop
public NamingEnumeration<String> getIDs()Retrieves an enumeration of the ids of the attributes in the attribute set. The effects of updates to this attribute set on this enumeration are undefined. -
isCaseIgnoredtop
public boolean isCaseIgnored()Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes. -
puttop
Adds a new attribute to the attribute set. -
puttop
Adds a new attribute to the attribute set. -
removetop
Removes the attribute with the attribute id 'attrID' from the attribute set. If the attribute does not exist, ignore. -
sizetop
public int size()Retrieves the number of attributes in the attribute set.
