Main Page | Class Hierarchy | Class List | Class Members

org::jdom::ContentList Class Reference

List of all members.

Public Member Functions

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

 ContentList (Parent parent)
final void uncheckedAddContent (Content c)
void add (int index, Content child)
void clearAndSet (Collection collection)
void ensureCapacity (int minCapacity)
List getView (Filter filter)
int indexOfFirstElement ()
int indexOfDocType ()

Detailed Description

A non-public list implementation holding only legal JDOM content, including content for Document or Element nodes. Users see this class as a simple List implementation.

See also:
CDATA

Comment

Element

EntityRef

ProcessingInstruction

Text

Version:
Revision
1.39
,
Date
2004/02/28 03:30:27
Author:
Alex Rosen

Philippe Riand

Bradley S. Huffman


Constructor & Destructor Documentation

org::jdom::ContentList::ContentList Parent  parent  )  [inline, package]
 

Force either a Document or Element parent


Member Function Documentation

void org::jdom::ContentList::add int  index,
Content  child
[inline, package]
 

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

Parameters:
index index where to add Element
child Element to add

void org::jdom::ContentList::add int  index,
Object  obj
[inline]
 

Inserts the specified object at the specified position in this list. Shifts the object currently at that position (if any) and any subsequent objects 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::ContentList::addAll int  index,
Collection  collection
[inline]
 

Inserts the specified collecton at the specified position in this list. Shifts the object currently at that position (if any) and any subsequent objects 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::ContentList::addAll Collection  collection  )  [inline]
 

Add the specified collecton to the end of this list.

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

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

Clear the current list.

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

void org::jdom::ContentList::ensureCapacity int  minCapacity  )  [inline, package]
 

Increases the capacity of this ContentList 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::ContentList::get int  index  )  [inline]
 

Return the object at the specified offset.

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

List org::jdom::ContentList::getView Filter  filter  )  [inline, package]
 

Return a view of this list based on the given filter.

Parameters:
filter Filter for this view.
Returns:
a list representing the rules of the Filter.

int org::jdom::ContentList::indexOfDocType  )  [inline, package]
 

Return the index of the DocType element in the list. If the list contains no DocType, it returns -1.

Returns:
index of the DocType, or -1 if it doesn't exist

int org::jdom::ContentList::indexOfFirstElement  )  [inline, package]
 

Return the index of the first Element in the list. If the parent is a Document then the element is the root element. If the list contains no Elements, it returns -1.

Returns:
index of first element, or -1 if one doesn't exist

Object org::jdom::ContentList::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::ContentList::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::ContentList::size  )  [inline]
 

Return the number of items in this list

Returns:
The number of items in this list.

String org::jdom::ContentList::toString  )  [inline]
 

Return this list as a String

Returns:
The number of items in this list.

final void org::jdom::ContentList::uncheckedAddContent Content  c  )  [inline, package]
 

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

Parameters:
c content 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