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 |
Classes | |
class | FilterList |
class | FilterListIterator |
ContentList
represents legal JDOM content, including content for Document
s or Element
s. This class is NOT PUBLIC; users should see it as a simple List implementation.
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
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).
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::ContentList::add | ( | int | index, | |
Element | element | |||
) | [inline, protected] |
void org::jdom::ContentList::add | ( | int | index, | |
Comment | comment | |||
) | [inline, protected] |
void org::jdom::ContentList::add | ( | int | index, | |
ProcessingInstruction | pi | |||
) | [inline, protected] |
Check and add the ProcessingInstruction
to this list at the given index.
index | index where to add ProcessingInstruction | |
pi | ProcessingInstruction to add |
void org::jdom::ContentList::add | ( | int | index, | |
CDATA | cdata | |||
) | [inline, protected] |
void org::jdom::ContentList::add | ( | int | index, | |
Text | text | |||
) | [inline, protected] |
void org::jdom::ContentList::add | ( | int | index, | |
EntityRef | entity | |||
) | [inline, protected] |
Check and add the EntityRef
to this list at the given index.
index | index where to add Entity | |
entity | Entity to add |
boolean org::jdom::ContentList::addAll | ( | Collection | collection | ) | [inline] |
Add the specified collecton to the end of this list.
collection | The collection to add to the list. |
true
if the list was modified as a result of the add. 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).
index | The offset to start adding the data in the collection | |
collection | The collection to insert into the list. |
true
if the list was modified as a result of the add. throws IndexOutOfBoundsException if index < 0 || index > size() 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.
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.
minCapacity | the desired minimum capacity. |
Object org::jdom::ContentList::get | ( | int | index | ) | [inline] |
Return the object at the specified offset.
index | The offset of the object. |
List org::jdom::ContentList::getView | ( | Filter | filter | ) | [inline, protected] |
Return a view of this list based on the given filter.
filter | Filter for this view. |
Filter
. int org::jdom::ContentList::indexOfFirstElement | ( | ) | [inline, protected] |
Object org::jdom::ContentList::remove | ( | int | index | ) | [inline] |
Remove the object at the specified offset.
index | The offset of the object. |
Object org::jdom::ContentList::set | ( | int | index, | |
Object | obj | |||
) | [inline] |
Set the object at the specified location to the supplied object.
index | The location to set the value to. | |
obj | The location to set the value to. |
int org::jdom::ContentList::size | ( | ) | [inline] |
Return the number of items in this list
String org::jdom::ContentList::toString | ( | ) | [inline] |
Return this list as a String
Object org::jdom::ContentList::parent [protected] |