Package org.jfree.xml.writer
Class AttributeList
- java.lang.Object
-
- org.jfree.xml.writer.AttributeList
-
public class AttributeList extends java.lang.ObjectThe attribute list is used by a writer to specify the attributes of an XML element in a certain order.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAttributeList.AttributeEntryA name/value pair of the attribute list.private static classAttributeList.AttributeIteratorAn iterator over the attribute names of this list.
-
Field Summary
Fields Modifier and Type Field Description private java.util.ListentryListThe storage for all entries of this list.
-
Constructor Summary
Constructors Constructor Description AttributeList()Creates an empty attribute list with no default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAttribute(java.lang.String name)Returns the attribute value for the given attribute name or null, if the attribute is not defined in this list.java.lang.StringgetAttribute(java.lang.String name, java.lang.String defaultValue)Returns the attribute value for the given attribute name or the given defaultvalue, if the attribute is not defined in this list.java.util.Iteratorkeys()Returns an iterator over all attribute names.voidremoveAttribute(java.lang.String name)Removes the attribute with the given name from the list.voidsetAttribute(java.lang.String name, java.lang.String value)Defines an attribute.
-
-
-
Method Detail
-
keys
public java.util.Iterator 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
public void setAttribute(java.lang.String name, java.lang.String value)Defines an attribute.- Parameters:
name- the name of the attribute to be definedvalue- the value of the attribute.
-
getAttribute
public java.lang.String getAttribute(java.lang.String name)
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
public java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)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
public void removeAttribute(java.lang.String name)
Removes the attribute with the given name from the list.- Parameters:
name- the name of the attribute which should be removed..
-
-