org.apache.xml.utils

Class MutableAttrListImpl

Implemented Interfaces:
Serializable

public class MutableAttrListImpl
extends AttributesImpl
implements Serializable

Mutable version of AttributesImpl.

Constructor Summary

MutableAttrListImpl()
Construct a new, empty AttributesImpl object.
MutableAttrListImpl(Attributes atts)
Copy an existing Attributes object.

Method Summary

void
addAttribute(String uri, String localName, String qName, String type, String value)
Add an attribute to the end of the list.
void
addAttributes(Attributes atts)
Add the contents of the attribute list to this list.
boolean
contains(String name)
Return true if list contains the given (raw) attribute name.

Constructor Details

MutableAttrListImpl

public MutableAttrListImpl()
Construct a new, empty AttributesImpl object.

MutableAttrListImpl

public MutableAttrListImpl(Attributes atts)
Copy an existing Attributes object.

This constructor is especially useful inside a start element event.

Parameters:
atts - The existing Attributes object.

Method Details

addAttribute

public void addAttribute(String uri,
                         String localName,
                         String qName,
                         String type,
                         String value)
Add an attribute to the end of the list.

For the sake of speed, this method does no checking to see if the attribute is already in the list: that is the responsibility of the application.

Parameters:
uri - The Namespace URI, or the empty string if none is available or Namespace processing is not being performed.
localName - The local name, or the empty string if Namespace processing is not being performed.
qName - The qualified (prefixed) name, or the empty string if qualified names are not available.
type - The attribute type as a string.
value - The attribute value.

addAttributes

public void addAttributes(Attributes atts)
Add the contents of the attribute list to this list.
Parameters:
atts - List of attributes to add to this list

contains

public boolean contains(String name)
Return true if list contains the given (raw) attribute name.
Parameters:
name - Raw name of attribute to look for
Returns:
true if an attribute is found with this name

Copyright B) 2004 Apache XML Project. All Rights Reserved.