| java.util.AbstractList org.jdom.ContentList
ContentList | final class ContentList extends AbstractList implements java.io.Serializable(Code) | | 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 See Also: Comment See Also: Element See Also: EntityRef See Also: ProcessingInstruction See Also: Text version: $Revision: 1.1 $, $Date: 2005/04/27 09:32:38 $ author: Alex Rosen author: Philippe Riand author: Bradley S. Huffman |
Inner Class :class FilterListIterator implements ListIterator | |
Method Summary | |
public void | add(int index, Object obj) Inserts the specified object at the specified position in this list. | void | add(int index, Content child) Check and add the Element to this list at
the given index. | public boolean | addAll(Collection collection) Add the specified collecton to the end of this list.
Parameters: collection - The collection to add to the list. | public boolean | addAll(int index, Collection collection) 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 Parameters: collection - The collection to insert into the list. | public void | clear() Clear the current list. | void | clearAndSet(Collection collection) Clear the current list and set it to the contents
of the Collection . | void | ensureCapacity(int minCapacity) 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. | public Object | get(int index) Return the object at the specified offset.
Parameters: index - The offset of the object. | List | getView(Filter filter) Return a view of this list based on the given filter.
Parameters: filter - Filter for this view. | int | indexOfDocType() Return the index of the DocType element in the list. | int | indexOfFirstElement() Return the index of the first Element in the list. | public Object | remove(int index) Remove the object at the specified offset.
Parameters: index - The offset of the object. | public Object | set(int index, Object obj) Set the object at the specified location to the supplied
object.
Parameters: index - The location to set the value to. Parameters: obj - The location to set the value to. | public int | size() | public String | toString() | final void | uncheckedAddContent(Content c) Package internal method to support building from sources that are
100% trusted. |
ContentList | ContentList(Parent parent)(Code) | | Force either a Document or Element parent
|
add | public void add(int index, Object obj)(Code) | | 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. Parameters: obj - The object to insert into the list.throws IndexOutOfBoundsException if index < 0 || index > size() |
add | void add(int index, Content child)(Code) | | Check and add the Element to this list at
the given index.
Parameters: index - index where to add Element Parameters: child - Element to add |
addAll | public boolean addAll(Collection collection)(Code) | | Add the specified collecton to the end of this list.
Parameters: collection - The collection to add to the list. true if the list was modified as a result ofthe add. |
addAll | public boolean addAll(int index, Collection collection)(Code) | | 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 Parameters: collection - The collection to insert into the list. true if the list was modified as a result ofthe add.throws IndexOutOfBoundsException if index < 0 || index > size() |
clear | public void clear()(Code) | | Clear the current list.
|
clearAndSet | void clearAndSet(Collection collection)(Code) | | Clear the current list and set it to the contents
of the Collection .
object.
Parameters: collection - The collection to use. |
ensureCapacity | void ensureCapacity(int minCapacity)(Code) | | 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. |
get | public Object get(int index)(Code) | | Return the object at the specified offset.
Parameters: index - The offset of the object. The Object which was returned. |
getView | List getView(Filter filter)(Code) | | Return a view of this list based on the given filter.
Parameters: filter - Filter for this view. a list representing the rules of the Filter . |
indexOfDocType | int indexOfDocType()(Code) | | Return the index of the DocType element in the list. If the list contains
no DocType, it returns -1.
index of the DocType, or -1 if it doesn'texist |
indexOfFirstElement | int indexOfFirstElement()(Code) | | 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.
index of first element, or -1 if one doesn't exist |
remove | public Object remove(int index)(Code) | | Remove the object at the specified offset.
Parameters: index - The offset of the object. The Object which was removed. |
set | public Object set(int index, Object obj)(Code) | | Set the object at the specified location to the supplied
object.
Parameters: index - The location to set the value to. Parameters: obj - The location to set the value to. The object which was replaced.throws IndexOutOfBoundsException if index < 0 || index >= size() |
size | public int size()(Code) | | Return the number of items in this list
The number of items in this list. |
toString | public String toString()(Code) | | Return this list as a String
The number of items in this list. |
uncheckedAddContent | final void uncheckedAddContent(Content c)(Code) | | Package internal method to support building from sources that are
100% trusted.
Parameters: c - content to add without any checks |
Fields inherited from java.util.AbstractList | protected transient int modCount(Code)(Java Doc)
|
|
|