Main Page | Class Hierarchy | Class List | Class Members | Related Pages

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

Protected Member Functions

 ContentList (Document document)
 ContentList (Element parent)
void add (int index, Element element)
void add (int index, Comment comment)
void add (int index, ProcessingInstruction pi)
void add (int index, CDATA cdata)
void add (int index, Text text)
void add (int index, EntityRef entity)
void clearAndSet (Collection collection)
void ensureCapacity (int minCapacity)
List getView (Filter filter)
int indexOfFirstElement ()

Protected Attributes

Object parent

Detailed Description

ContentList represents legal JDOM content, including content for Documents or Elements. 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.21
,
Date
2003/04/18 04:04:11
See also:
CDATA

Comment

Element

EntityRef

ProcessingInstruction

Text


Constructor & Destructor Documentation

org::jdom::ContentList::ContentList Document  document  )  [inline, protected]
 

Create a new instance of the ContentList representing Document content

org::jdom::ContentList::ContentList Element  parent  )  [inline, protected]
 

Create a new instance of the ContentList representing Element content


Member Function Documentation

void org::jdom::ContentList::add int  index,
EntityRef  entity
[inline, protected]
 

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

Parameters:
index index where to add Entity
entity Entity to add

void org::jdom::ContentList::add int  index,
Text  text
[inline, protected]
 

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

Parameters:
index index where to add Text
text Text to add

void org::jdom::ContentList::add int  index,
CDATA  cdata
[inline, protected]
 

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

Parameters:
index index where to add CDATA
cdata CDATA to add

void org::jdom::ContentList::add int  index,
ProcessingInstruction  pi
[inline, protected]
 

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

Parameters:
index index where to add ProcessingInstruction
pi ProcessingInstruction to add

void org::jdom::ContentList::add int  index,
Comment  comment
[inline, protected]
 

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

Parameters:
index index where to add Comment
comment Comment to add

void org::jdom::ContentList::add int  index,
Element  element
[inline, protected]
 

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

Parameters:
index index where to add Element
element 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, protected]
 

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, protected]
 

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, protected]
 

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::indexOfFirstElement  )  [inline, protected]
 

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.


Member Data Documentation

Object org::jdom::ContentList::parent [protected]
 

Document or Element this list belongs to


The documentation for this class was generated from the following file:
Generated on Tue Oct 26 18:17:01 2004 for JDOM by  doxygen 1.3.9.1