Main Page | Class Hierarchy | Class List | Class Members

org::jdom::AttributeList Class Reference

List of all members.

Public Member Functions

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

Package Functions

 AttributeList (Element parent)
final void uncheckedAddAttribute (Attribute a)
void add (int index, Attribute attribute)
void clearAndSet (Collection collection)
Object get (String name, Namespace namespace)
int indexOf (String name, Namespace namespace)
boolean remove (String name, Namespace namespace)
Object set (int index, Attribute attribute)

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.23
,
Date
2004/02/28 03:30:27
See also:
CDATA

Comment

Element

EntityRef

ProcessingInstruction

Text


Constructor & Destructor Documentation

org::jdom::AttributeList::AttributeList Element  parent  )  [inline, package]
 

Create a new instance of the AttributeList representing Element content

Parameters:
parent element whose attributes are to be held


Member Function Documentation

void org::jdom::AttributeList::add int  index,
Attribute  attribute
[inline, package]
 

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

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()

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.
Returns:
true (as per the general contract of Collection.add).
Exceptions:
IndexOutOfBoundsException if index < 0 || index > size()

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()

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.

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

Clear the current list.

void org::jdom::AttributeList::clearAndSet Collection  collection  )  [inline, package]
 

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

Parameters:
collection The collection to use.

Object org::jdom::AttributeList::get String  name,
Namespace  namespace
[inline, package]
 

Return the Attribute with the given name and Namespace.

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

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.

int org::jdom::AttributeList::indexOf String  name,
Namespace  namespace
[inline, package]
 

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

boolean org::jdom::AttributeList::remove String  name,
Namespace  namespace
[inline, package]
 

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::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 org::jdom::AttributeList::set int  index,
Attribute  attribute
[inline, package]
 

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()

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()

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

final void org::jdom::AttributeList::uncheckedAddAttribute Attribute  a  )  [inline, package]
 

Package internal method to support building from sources that are 100% trusted.

Parameters:
a attribute to add without any checks


The documentation for this class was generated from the following file:
Generated on Thu Dec 9 10:42:04 2004 for JDOM by  doxygen 1.3.9.1