org::jdom::AttributeList Class Reference

List of all members.

Public Member Functions

 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 Member Functions

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)
Object set (int index, Attribute attribute)

Protected Attributes

Element parent

Detailed Description

AttributeList represents legal 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.16
,
Date
2003/04/18 04:04:11
See also:
CDATA

Comment

Element

EntityRef

ProcessingInstruction

Text


Constructor & Destructor Documentation

org::jdom::AttributeList::AttributeList ( Element  parent  )  [inline]

Create a new instance of the AttributeList representing Element content


Member Function Documentation

boolean org::jdom::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:
obj The object to insert into the list. throws IndexOutOfBoundsException if index < 0 || index > size()

void org::jdom::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()

void org::jdom::AttributeList::add ( int  index,
Attribute  attribute 
) [inline, protected]

Check and add the Attribute to this list at the given index. Note: does not check for duplicate attributes.

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

boolean org::jdom::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.

boolean org::jdom::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()

void org::jdom::AttributeList::clear (  )  [inline]

Clear the current list.

void org::jdom::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 org::jdom::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 org::jdom::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.

Object org::jdom::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.

int org::jdom::AttributeList::indexOf ( String  name,
Namespace  namespace 
) [inline, protected]

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

Object org::jdom::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.

boolean org::jdom::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 org::jdom::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()

Object org::jdom::AttributeList::set ( int  index,
Attribute  attribute 
) [inline, protected]

Set the object at the specified location to the supplied object. Note: does not check for duplicate attributes.

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

int org::jdom::AttributeList::size (  )  [inline]

Return the number of items in this list

Returns:
The number of items in this list.

String org::jdom::AttributeList::toString (  )  [inline]

Return this list as a String


Member Data Documentation

Element org::jdom::AttributeList::parent [protected]

The parent Element


The documentation for this class was generated from the following file:
Generated on Sat Nov 11 01:47:11 2006 for JDOM by  doxygen 1.5.1