Main Page   Packages   Namespace List   Class Hierarchy   Compound List   Compound Members  

AttributeList Class Reference

List of all members.

Public Methods

 AttributeList (Element parent)
boolean add (Object obj)
void add (int index, Object obj)
boolean addAll (Collection collection)
boolean addAll (int index, Collection collection)
void clear ()
void clearAndSet (Collection collection)
Object get (int index)
Object remove (int index)
Object set (int index, Object obj)
int size ()
String toString ()

Protected Methods

void add (int index, Attribute attribute)
void ensureCapacity (int minCapacity)
Object get (String name, Namespace namespace)
int indexOf (String name, Namespace namespace)
boolean remove (String name, Namespace namespace)

Protected Attributes

ArrayList list
Element parent

Detailed Description

AttributeList represents valid JDOM Attribute content. This class is NOT PUBLIC; users should see it as a simple List implementation.

Author:
Alex Rosen , Philippe Riand , Bradley S. Huffman
Version:
Revision:
1.3
,
Date:
2002/02/05 10:07:43
See also:
CDATA , Comment , Element , EntityRef , ProcessingInstruction , Text


Constructor & Destructor Documentation

AttributeList::AttributeList Element    parent [inline]
 

Create a new instance of the AttributeList representing Element content


Member Function Documentation

void AttributeList::add int    index,
Attribute    attribute
[inline, protected]
 

Check and add the Attribute to this list at the given index.

Parameters:
index  index where to add Attribute
attribute  Attribute to add

void AttributeList::add int    index,
Object    obj
[inline]
 

Inserts the specified attribute at the specified position in this list. Shifts the attribute currently at that position (if any) and any subsequent attributes to the right (adds one to their indices).

Parameters:
index  The location to set the value to.
obj  The object to insert into the list. throws IndexOutOfBoundsException if index < 0 || index > size()

boolean AttributeList::add Object    obj [inline]
 

Add a attribute to the end of the list or replace a existing attribute with the same name and Namespace.

Parameters:
index  The location to set the value to.
obj  The object to insert into the list. throws IndexOutOfBoundsException if index < 0 || index > size()

boolean AttributeList::addAll int    index,
Collection    collection
[inline]
 

Inserts the specified collecton at the specified position in this list. Shifts the attribute currently at that position (if any) and any subsequent attributes to the right (adds one to their indices).

Parameters:
index  The offset to start adding the data in the collection
collection  The collection to insert into the list.
Returns:
true if the list was modified as a result of the add. throws IndexOutOfBoundsException if index < 0 || index > size()

boolean AttributeList::addAll Collection    collection [inline]
 

Add all the objects in the specified collection.

Parameters:
collection  The collection containing all the objects to add.
Returns:
true if the list was modified as a result of the add.

void AttributeList::clear   [inline]
 

Clear the current list.

void AttributeList::clearAndSet Collection    collection [inline]
 

Clear the current list and set it to the contents of the Collection. object.

Parameters:
collection  The collection to use.

void AttributeList::ensureCapacity int    minCapacity [inline, protected]
 

Increases the capacity of this AttributeList instance, if necessary, to ensure that it can hold at least the number of items specified by the minimum capacity argument.

Parameters:
minCapacity  the desired minimum capacity.

Object AttributeList::get String    name,
Namespace    namespace
[inline, protected]
 

Return the Attribute with the given Namespace.

Parameters:
namespace  Namespace to match
Returns:
the Attribute, or null if one doesn't exist.

Object AttributeList::get int    index [inline]
 

Return the object at the specified offset.

Parameters:
index  The offset of the object.
Returns:
The Object which was returned.

int AttributeList::indexOf String    name,
Namespace    namespace
[inline, protected]
 

Return index of the Attribute with the given name and uri.

boolean AttributeList::remove String    name,
Namespace    namespace
[inline, protected]
 

Remove the Attribute with the given name and Namespace.

Parameters:
namespace  Namespace to match
Returns:
the true if attribute was removed, false otherwise

Object AttributeList::remove int    index [inline]
 

Remove the object at the specified offset.

Parameters:
index  The offset of the object.
Returns:
The Object which was removed.

Object AttributeList::set int    index,
Object    obj
[inline]
 

Set the object at the specified location to the supplied object.

Parameters:
index  The location to set the value to.
obj  The location to set the value to.
Returns:
The object which was replaced. throws IndexOutOfBoundsException if index < 0 || index >= size()

int AttributeList::size   [inline]
 

Return the number of items in this list

Returns:
The number of items in this list.

String AttributeList::toString   [inline]
 

Return this list as a String


Member Data Documentation

ArrayList AttributeList::list [protected]
 

The backing list

Element AttributeList::parent [protected]
 

The parent Element


The documentation for this class was generated from the following file:
Generated on Sat Mar 30 18:53:03 2002 for JDOM by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001