|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jdom
Class ContentList

java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.jdom.ContentList
- All Implemented Interfaces:
- java.util.Collection, java.lang.Iterable, java.util.List, java.io.Serializable
- final class ContentList
- extends java.util.AbstractList
- implements java.io.Serializable
- extends java.util.AbstractList
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.
- Version:
- $Revision: 1.39 $, $Date: 2004/02/28 03:30:27 $
| Nested Class Summary | |
(package private) class |
ContentList.FilterList
FilterList represents legal JDOM content, including content
for Documents or Elements. |
(package private) class |
ContentList.FilterListIterator
|
| Nested classes inherited from class java.util.AbstractList |
|
| Field Summary | |
private static int |
ADD
|
private static int |
CREATE
Used inner class FilterListIterator to help hasNext and hasPrevious the next index of our cursor (must be here for JDK1.1). |
private static java.lang.String |
CVS_ID
|
private Content[] |
elementData
Our backing list |
private static int |
HASNEXT
|
private static int |
HASPREV
|
private static int |
INITIAL_ARRAY_SIZE
|
private static int |
NEXT
|
private Parent |
parent
Document or Element this list belongs to |
private static int |
PREV
|
private static int |
REMOVE
|
private int |
size
|
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
(package private) |
ContentList(Parent parent)
Force either a Document or Element parent |
| Method Summary | |
(package private) void |
add(int index,
Content child)
Check and add the Element to this list at
the given index. |
void |
add(int index,
java.lang.Object obj)
Inserts the specified object at the specified position in this list. |
boolean |
addAll(java.util.Collection collection)
Add the specified collecton to the end of this list. |
boolean |
addAll(int index,
java.util.Collection collection)
Inserts the specified collecton at the specified position in this list. |
void |
clear()
Clear the current list. |
(package private) void |
clearAndSet(java.util.Collection collection)
Clear the current list and set it to the contents of the Collection. |
private void |
documentCanContain(int index,
Content child)
|
private static void |
elementCanContain(int index,
Content child)
|
(package private) 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. |
java.lang.Object |
get(int index)
Return the object at the specified offset. |
private int |
getModCount()
Give access of ContentList.modCount to FilterList |
(package private) java.util.List |
getView(org.jdom.filter.Filter filter)
Return a view of this list based on the given filter. |
(package private) int |
indexOfDocType()
Return the index of the DocType element in the list. |
(package private) int |
indexOfFirstElement()
Return the index of the first Element in the list. |
java.lang.Object |
remove(int index)
Remove the object at the specified offset. |
private static void |
removeParent(Content c)
Remove the parent of a Object |
java.lang.Object |
set(int index,
java.lang.Object obj)
Set the object at the specified location to the supplied object. |
int |
size()
Return the number of items in this list |
java.lang.String |
toString()
Return this list as a String |
(package private) void |
uncheckedAddContent(Content c)
Package internal method to support building from sources that are 100% trusted. |
| Methods inherited from class java.util.AbstractList |
add, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Field Detail |
CVS_ID
private static final java.lang.String CVS_ID
- See Also:
- Constant Field Values
INITIAL_ARRAY_SIZE
private static final int INITIAL_ARRAY_SIZE
- See Also:
- Constant Field Values
CREATE
private static final int CREATE
- Used inner class FilterListIterator to help hasNext and
hasPrevious the next index of our cursor (must be here
for JDK1.1).
- See Also:
- Constant Field Values
HASPREV
private static final int HASPREV
- See Also:
- Constant Field Values
HASNEXT
private static final int HASNEXT
- See Also:
- Constant Field Values
PREV
private static final int PREV
- See Also:
- Constant Field Values
NEXT
private static final int NEXT
- See Also:
- Constant Field Values
ADD
private static final int ADD
- See Also:
- Constant Field Values
REMOVE
private static final int REMOVE
- See Also:
- Constant Field Values
elementData
private Content[] elementData
- Our backing list
size
private int size
parent
private Parent parent
- Document or Element this list belongs to
| Constructor Detail |
ContentList
ContentList(Parent parent)
- Force either a Document or Element parent
| Method Detail |
uncheckedAddContent
final void uncheckedAddContent(Content c)
- Package internal method to support building from sources that are
100% trusted.
add
public void add(int index,
java.lang.Object obj)
- 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).
- Specified by:
addin interfacejava.util.List
documentCanContain
private void documentCanContain(int index,
Content child)
throws IllegalAddException
elementCanContain
private static void elementCanContain(int index,
Content child)
throws IllegalAddException
add
void add(int index,
Content child)
- Check and add the
Elementto this list at the given index.
addAll
public boolean addAll(java.util.Collection collection)
- Add the specified collecton to the end of this list.
- Specified by:
addAllin interfacejava.util.List
addAll
public boolean addAll(int index,
java.util.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).
- Specified by:
addAllin interfacejava.util.List
clear
public void clear()
- Clear the current list.
- Specified by:
clearin interfacejava.util.List
clearAndSet
void clearAndSet(java.util.Collection collection)
- Clear the current list and set it to the contents
of the
Collection. object.
ensureCapacity
void ensureCapacity(int minCapacity)
- Increases the capacity of this
ContentListinstance, if necessary, to ensure that it can hold at least the number of items specified by the minimum capacity argument.
get
public java.lang.Object get(int index)
- Return the object at the specified offset.
- Specified by:
getin interfacejava.util.List
getView
java.util.List getView(org.jdom.filter.Filter filter)
- Return a view of this list based on the given filter.
indexOfFirstElement
int indexOfFirstElement()
- Return the index of the first Element in the list. If the parent
is a
Documentthen the element is the root element. If the list contains no Elements, it returns -1.
indexOfDocType
int indexOfDocType()
- Return the index of the DocType element in the list. If the list contains
no DocType, it returns -1.
remove
public java.lang.Object remove(int index)
- Remove the object at the specified offset.
- Specified by:
removein interfacejava.util.List
removeParent
private static void removeParent(Content c)
- Remove the parent of a Object
set
public java.lang.Object set(int index, java.lang.Object obj)
- Set the object at the specified location to the supplied
object.
- Specified by:
setin interfacejava.util.List
size
public int size()
- Return the number of items in this list
- Specified by:
sizein interfacejava.util.List
toString
public java.lang.String toString()
- Return this list as a
String
getModCount
private int getModCount()
- Give access of ContentList.modCount to FilterList
|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC