public class AttributeList extends java.lang.Object
Constructor | Description |
---|---|
AttributeList() |
Creates an empty attribute list with no default values.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
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.
|
java.util.Iterator |
keys() |
Returns an iterator over all attribute names.
|
void |
removeAttribute(java.lang.String name) |
Removes the attribute with the given name from the list.
|
void |
setAttribute(java.lang.String name,
java.lang.String value) |
Defines an attribute.
|
public AttributeList()
public java.util.Iterator keys()
public void setAttribute(java.lang.String name, java.lang.String value)
name
- the name of the attribute to be definedvalue
- the value of the attribute.public java.lang.String getAttribute(java.lang.String name)
name
- the name of the attributepublic java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
name
- the name of the attribute.defaultValue
- the default value.public void removeAttribute(java.lang.String name)
name
- the name of the attribute which should be removed..