Package org.exolab.adaptx.xml
Class AttributeListImpl
java.lang.Object
org.exolab.adaptx.xml.AttributeListImpl
- All Implemented Interfaces:
AttributeList
my own implementation of the SAX AttributeList
- Version:
- $Revision: 3633 $ $Date: 2003-03-01 08:38:44 +0100 (Sat, 01 Mar 2003) $
- Author:
- Keith Visco
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String name, String value) void
clear()
Removes all attribute mappings from this AttributeListint
Returns the number of attributes in the list.getName
(int i) Returns the name of the attribute at the given index.getType
(int i) Returns the type of the attribute at the specified index.Return the type of the attribute with the given name.getValue
(int i) Return the value of the attribute at the specified indexGet the value of an attribute (by name).void
remove
(int index) Removes the name-value pair at the given indexvoid
Removes the name and it's associated value from this AttributeList
-
Constructor Details
-
AttributeListImpl
public AttributeListImpl() -
AttributeListImpl
public AttributeListImpl(int size)
-
-
Method Details
-
addAttribute
-
clear
public void clear()Removes all attribute mappings from this AttributeList -
remove
public void remove(int index) Removes the name-value pair at the given index- Parameters:
index
- the index to remove the name value pair from
-
remove
Removes the name and it's associated value from this AttributeList- Parameters:
the
- name of the attribute mapping to remove
-
getLength
public int getLength()Returns the number of attributes in the list.- Specified by:
getLength
in interfaceAttributeList
- Returns:
- The number of attributes in the list.
-
getName
Returns the name of the attribute at the given index.- Specified by:
getName
in interfaceAttributeList
- Parameters:
i
- The position of the attribute in the list.- Returns:
- The attribute name as a string, or null if there is no attribute at that position.
-
getType
Returns the type of the attribute at the specified index.- Specified by:
getType
in interfaceAttributeList
- Parameters:
i
- The position of the attribute in the list.- Returns:
- The attribute type as a string ("NMTOKEN" for an
enumeration, and "CDATA" if no declaration was
read), or null if there is no attribute at
that position.
Note: Not supported, will simply return null.
-
getValue
Return the value of the attribute at the specified index- Specified by:
getValue
in interfaceAttributeList
- Parameters:
i
- The position of the attribute in the list.- Returns:
- The attribute value as a string, or null if there is no attribute at that position.
-
getType
Return the type of the attribute with the given name.- Specified by:
getType
in interfaceAttributeList
- Parameters:
name
- The attribute name.- Returns:
- The attribute type as a string ("NMTOKEN" for an
enumeration, and "CDATA" if no declaration was
read).
Note: Not supported, will simply return null.
-
getValue
Get the value of an attribute (by name).- Specified by:
getValue
in interfaceAttributeList
- Parameters:
name
- The attribute name.- See Also:
-