|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.4.2
javax.naming.directory
|
Constructor Summary | |
BasicAttributes()
Constructs 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 | |
Object |
clone()
Makes a copy of the attribute set. |
boolean |
equals(Object obj)
Determines whether this BasicAttributes is equal to another Attributes Two Attributes are equal if they are both instances of Attributes, treat the case of attribute IDs the same way, and contain the same attributes. |
Attribute |
get(String attrID)
Retrieves the attribute with the given attribute id from the attribute set. |
NamingEnumeration |
getAll()
Retrieves an enumeration of the attributes in the attribute set. |
NamingEnumeration |
getIDs()
Retrieves an enumeration of the ids of the attributes in the attribute set. |
int |
hashCode()
Calculates the hash code of this BasicAttributes. |
boolean |
isCaseIgnored()
Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes. |
Attribute |
put(Attribute attr)
Adds a new attribute to the attribute set. |
Attribute |
put(String attrID,
Object val)
Adds a new attribute to the attribute set. |
Attribute |
remove(String attrID)
Removes the attribute with the attribute id 'attrID' from the attribute set. |
int |
size()
Retrieves the number of attributes in the attribute set. |
String |
toString()
Generates the string representation of this attribute set. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BasicAttributes()
public BasicAttributes(boolean ignoreCase)
ignoreCase
is true, the character case of attribute
identifiers is ignored; otherwise the case is significant.
ignoreCase
- true means this attribute set will ignore
the case of its attribute identifiers
when retrieving or adding attributes;
false means case is respected.public BasicAttributes(String attrID, Object val)
attrID
- non-null The id of the attribute to add.val
- The value of the attribute to add. If null, a null
value is added to the attribute.public BasicAttributes(String attrID, Object val, boolean ignoreCase)
ignoreCase
is true, the character case of attribute
identifiers is ignored; otherwise the case is significant.
attrID
- non-null The id of the attribute to add.
If this attribute set ignores the character
case of its attribute ids, the case of attrID
is ignored.val
- The value of the attribute to add. If null, a null
value is added to the attribute.ignoreCase
- true means this attribute set will ignore
the case of its attribute identifiers
when retrieving or adding attributes;
false means case is respected.Method Detail |
public Object clone()
Attributes
clone
in interface Attributes
clone
in class Object
Cloneable
public boolean isCaseIgnored()
Attributes
isCaseIgnored
in interface Attributes
public int size()
Attributes
size
in interface Attributes
public Attribute get(String attrID)
Attributes
get
in interface Attributes
attrID
- The non-null id of the attribute to retrieve.
If this attribute set ignores the character
case of its attribute ids, the case of attrID
is ignored.
Attributes.put(java.lang.String, java.lang.Object)
,
Attributes.remove(java.lang.String)
public NamingEnumeration getAll()
Attributes
getAll
in interface Attributes
public NamingEnumeration getIDs()
Attributes
getIDs
in interface Attributes
public Attribute put(String attrID, Object val)
Attributes
put
in interface Attributes
attrID
- non-null The id of the attribute to add.
If the attribute set ignores the character
case of its attribute ids, the case of attrID
is ignored.val
- The possibly null value of the attribute to add.
If null, the attribute does not have any values.
Attributes.remove(java.lang.String)
public Attribute put(Attribute attr)
Attributes
put
in interface Attributes
attr
- The non-null attribute to add.
If the attribute set ignores the character
case of its attribute ids, the case of
attr's identifier is ignored.
Attributes.remove(java.lang.String)
public Attribute remove(String attrID)
Attributes
remove
in interface Attributes
attrID
- The non-null id of the attribute to remove.
If the attribute set ignores the character
case of its attribute ids, the case of
attrID is ignored.
public String toString()
public boolean equals(Object obj)
obj
- the possibly null object to compare against.
hashCode()
public int hashCode()
The hash code is computed by adding the hash code of the attributes of this object. If this BasicAttributes ignores case of its attribute IDs, one is added to the hash code. If a subclass overrides hashCode(), it should override equals() as well so that two Attributes instances that are equal have the same hash code.
equals(java.lang.Object)