public class AttributeList extends Hashtable
The AttributeListIterator
class provides an iterator over the components of each attribute in this AttributeList
instance:
Modifier and Type | Class and Description |
---|---|
static interface |
AttributeList.Filter
Interface to filter each attribute before entering it in the
AttributeList . |
class |
AttributeList.Iterator
Class to iterate over each attribute of an
AttributeList |
Hashtable.Entry
Modifier and Type | Field and Description |
---|---|
boolean |
caseInsensitive
Set to true if you want the get/set methods to be case insensitive.
|
allowDuplicateKeys, collisions, table
Constructor and Description |
---|
AttributeList()
Constructs an empty
attributeList with 5 free positions. |
AttributeList(AttributeList source)
Clones the given
attributeList . |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String attrName,
java.lang.String attrValue,
byte dlm)
Adds a new attribute to this AttributeList
|
java.lang.String |
getAttributeValue(java.lang.String name)
Gets the attribute value for a given name.
|
int |
getAttributeValueAsInt(java.lang.String name,
int defaultValue)
Gets the attribute value for a given name as an integer.
|
public boolean caseInsensitive
public AttributeList()
attributeList
with 5 free positions.public AttributeList(AttributeList source)
attributeList
.source
- The attributeList
to be cloned.public final void addAttribute(java.lang.String attrName, java.lang.String attrValue, byte dlm)
attrName
- The name of the attribute.attrValue
- The unquoted value of the attribute.dlm
- Delimiter that started the attribute value ('
or "
), or '\0'
if none.public final java.lang.String getAttributeValue(java.lang.String name)
name
- The attribute name.null
if it wasn't specified.public final int getAttributeValueAsInt(java.lang.String name, int defaultValue)
name
- The attribute name.defaultValue
- The default value if there is no value for the attribute name.