|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.teamkonzept.dom4jb.dom.NodeList
Field Summary | |
static NodeList |
EMPTY
|
protected static int |
initialCapacity
|
protected Node[] |
nodeData
The array buffer into which the elements of the NodeList are stored. |
protected ContentIterator |
nodeIterator
|
protected Node |
parent
The parent node of all nodes stored in this nodelist |
protected int |
size
The size of the NodeList (the number of elements it contains). |
Constructor Summary | |
NodeList(ContentIterator iterator)
Constructs an node list |
|
NodeList(Node parent)
|
|
NodeList(Node parent,
ContentIterator iterator)
Constructs an node list |
Method Summary | |
boolean |
add(Node o)
Appends the specified element to the end of this list. |
void |
clear()
Removes all of the elements from this list. |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this NodeList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument. |
Node |
get(int index)
Returns the index th item in the collection. |
int |
getLength()
Returns the number of elements in this list. |
Node |
getParentNode()
The parent of this nodes. |
boolean |
isEmpty()
Tests if this list has no elements. |
Node |
item(int index)
Returns the index th item in the collection. |
protected void |
setIterator(ContentIterator iterator)
|
void |
setParentNode(Node parent)
|
int |
size()
The number of nodes in the list. |
void |
trimToSize()
Trims the capacity of this NodeList instance to be the list's current size. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final NodeList EMPTY
protected static final int initialCapacity
protected Node[] nodeData
protected ContentIterator nodeIterator
protected int size
protected Node parent
Constructor Detail |
public NodeList(Node parent)
public NodeList(ContentIterator iterator)
public NodeList(Node parent, ContentIterator iterator)
Method Detail |
public void trimToSize()
public void ensureCapacity(int minCapacity)
minCapacity
- the desired minimum capacity.public int getLength()
getLength
in interface NodeList
public int size()
length-1
inclusive.
public boolean isEmpty()
public Node get(int index)
index
th item in the collection. If
index
is greater than or equal to the number of nodes in
the list, this returns null
.
index
- Index into the collection.
index
th position in the
NodeList
, or null
if that is not a valid
index.public Node item(int index)
index
th item in the collection. If
index
is greater than or equal to the number of nodes in
the list, this returns null
.
item
in interface NodeList
index
- Index into the collection.
index
th position in the
NodeList
, or null
if that is not a valid
index.public boolean add(Node o)
o
- element to be appended to this list.
public void clear()
public void setParentNode(Node parent)
public Node getParentNode()
Attr
,
Document
, DocumentFragment
,
Entity
, and Notation
may have a parent.
However, if a node has just been created and not yet added to the
tree, or if it has been removed from the tree, this is
null
.
protected void setIterator(ContentIterator iterator)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |