Package org.jfree.xml.writer
Class AttributeList
java.lang.Object
org.jfree.xml.writer.AttributeList
The attribute list is used by a writer to specify the attributes
of an XML element in a certain order.
- Author:
- Thomas Morgner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String name) Returns the attribute value for the given attribute name or null, if the attribute is not defined in this list.getAttribute
(String name, String defaultValue) Returns the attribute value for the given attribute name or the given defaultvalue, if the attribute is not defined in this list.keys()
Returns an iterator over all attribute names.void
removeAttribute
(String name) Removes the attribute with the given name from the list.void
setAttribute
(String name, String value) Defines an attribute.
-
Constructor Details
-
AttributeList
public AttributeList()Creates an empty attribute list with no default values.
-
-
Method Details
-
keys
Returns an iterator over all attribute names. The names are returned in their oder of addition to the list. The iterator contains strings.- Returns:
- the iterator over all attribute names.
-
setAttribute
Defines an attribute.- Parameters:
name
- the name of the attribute to be definedvalue
- the value of the attribute.
-
getAttribute
Returns the attribute value for the given attribute name or null, if the attribute is not defined in this list.- Parameters:
name
- the name of the attribute- Returns:
- the attribute value or null.
-
getAttribute
Returns the attribute value for the given attribute name or the given defaultvalue, if the attribute is not defined in this list.- Parameters:
name
- the name of the attribute.defaultValue
- the default value.- Returns:
- the attribute value or the defaultValue.
-
removeAttribute
Removes the attribute with the given name from the list.- Parameters:
name
- the name of the attribute which should be removed..
-