public class AttributesImpl extends Object implements Attributes
| Constructor and Description |
|---|
AttributesImpl() |
AttributesImpl(AttributesImpl other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
Set<String> values,
boolean replace)
Add the specified attribute to the attributes collection.
|
void |
addAttribute(String name,
String[] values,
boolean replace)
Add the specified attribute to the attributes collection.
|
void |
addAttribute(String name,
String value,
boolean replace)
Add the specified attribute to the attributes collection.
|
void |
clear()
Removes all attributes from the collection.
|
Attribute |
getAttribute(String name)
Get the Attribute object for the named attribute, if present.
|
int |
getAttributeCount()
Get a count of the number of Attributes (not attribute values) in this Attributes object.
|
Set<String> |
getAttributeNames()
Get the attribute names, as a Set.
|
String |
getAttributeValue(String name)
Get the value of the specified attribute, if present.
|
Set<String> |
getAttributeValues(String name)
Get the Set of values for the specified attribute, if present.
|
String[] |
getAttributeValuesAsArray(String name)
Get the set of values for the specified attribute as a String array.
|
void |
removeAllAttributeValues(String name)
Remove all values associated with the named attribute, but do not remove
the attribute from the collection.
|
void |
removeAttribute(String name)
Remove the specified attribute from the collection.
|
void |
removeAttributeValue(String name,
String value)
Remove the specified value from the named attribute.
|
void |
removeAttributeValues(String name,
Set<String> values)
Remove the specified values from the named attribute.
|
void |
removeAttributeValues(String name,
String[] values)
Remove the specified values from the named attribute.
|
public AttributesImpl()
public AttributesImpl(AttributesImpl other)
public int getAttributeCount()
AttributesgetAttributeCount in interface Attributespublic Set<String> getAttributeNames()
AttributesgetAttributeNames in interface Attributespublic Attribute getAttribute(String name)
AttributesgetAttribute in interface Attributesname - The name of the Attribute to get.public String getAttributeValue(String name)
AttributesgetAttributeValue in interface Attributesname - The name of the attribute whose value is wanted.public Set<String> getAttributeValues(String name)
AttributesgetAttributeValues in interface Attributesname - The name of the attribute whose values are wanted.public String[] getAttributeValuesAsArray(String name)
AttributesgetAttributeValuesAsArray in interface Attributesname - The name of the attribute whose values are wanted.public void addAttribute(String name, String value, boolean replace)
AttributesaddAttribute in interface Attributesname - The name of the attribute to add.value - The single attribute value to add.replace - If true, replace the existing attribute and any existing values. If false,
add the new value to those that are already present.public void addAttribute(String name, Set<String> values, boolean replace)
AttributesaddAttribute in interface Attributesname - The name of the attribute to add.replace - If true, replace the existing attribute and any existing values. If false,
add the new values to those that are already present.public void addAttribute(String name, String[] values, boolean replace)
AttributesaddAttribute in interface Attributesname - The name of the attribute to add.replace - If true, replace the existing attribute and any existing values. If false,
add the new values to those that are already present.public void removeAttribute(String name)
AttributesremoveAttribute in interface Attributesname - The name of the attribute to remove.public void removeAttributeValue(String name, String value)
AttributesremoveAttributeValue in interface Attributesname - The name of the attribute from which to remove a value.value - The value to remove. A value will be removed only if it exactly matches this parameter.public void removeAttributeValues(String name, Set<String> values)
AttributesremoveAttributeValues in interface Attributesname - The name of the attribute from which to remove the values.public void removeAttributeValues(String name, String[] values)
AttributesremoveAttributeValues in interface Attributesname - The name of the attribute from which to remove the values.public void removeAllAttributeValues(String name)
AttributesremoveAllAttributeValues in interface Attributesname - The name of the attribute whose values should be removed.public void clear()
Attributesclear in interface AttributesCopyright © 2013. All Rights Reserved.