Class BasicAttributes
- All Implemented Interfaces:
Serializable
,Cloneable
,Attributes
BasicAttributes is either case-sensitive or case-insensitive (case-ignore). This property is determined at the time the BasicAttributes constructor is called. In a case-insensitive BasicAttributes, the case of its attribute identifiers is ignored when searching for an attribute, or adding attributes. In a case-sensitive BasicAttributes, the case is significant.
When the BasicAttributes class needs to create an Attribute, it uses BasicAttribute. There is no other dependency on BasicAttribute.
Note that updates to BasicAttributes (such as adding or removing an attribute) does not affect the corresponding representation in the directory. Updates to the directory can only be effected using operations in the DirContext interface.
A BasicAttributes instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single BasicAttributes instance should lock the object.
- Since:
- 1.3
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance of Attributes.BasicAttributes
(boolean ignoreCase) Constructs a new instance of Attributes.BasicAttributes
(String attrID, Object val) Constructs a new instance of Attributes with one attribute.BasicAttributes
(String attrID, Object val, boolean ignoreCase) Constructs a new instance of Attributes with one attribute. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Makes a copy of the attribute set.boolean
Determines whether thisBasicAttributes
is equal to anotherAttributes
TwoAttributes
are equal if they are both instances ofAttributes
, treat the case of attribute IDs the same way, and contain the same attributes.Retrieves the attribute with the given attribute id from the attribute set.getAll()
Retrieves an enumeration of the attributes in the attribute set.getIDs()
Retrieves an enumeration of the ids of the attributes in the attribute set.int
hashCode()
Calculates the hash code of this BasicAttributes.boolean
Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes.Adds a new attribute to the attribute set.Adds a new attribute to the attribute set.Removes the attribute with the attribute id 'attrID' from the attribute set.int
size()
Retrieves the number of attributes in the attribute set.toString()
Generates the string representation of this attribute set.Methods declared in class java.lang.Object