org.apache.batik.dom

Class AbstractParentNode.ChildNodes

protected class AbstractParentNode.ChildNodes extends Object implements NodeList, Serializable

To manage the children of this node.
Field Summary
protected intchildren
The number of children.
protected ExtendedNodefirstChild
The first child.
protected ExtendedNodelastChild
The last child.
Constructor Summary
ChildNodes()
Creates a new ChildNodes object.
Method Summary
ExtendedNodeappend(ExtendedNode n)
Appends a node to the tree.
intgetLength()
DOM: Implements {@link org.w3c.dom.NodeList#getLength()}.
ExtendedNodeinsert(ExtendedNode n, ExtendedNode r)
Inserts a node in the tree.
Nodeitem(int index)
DOM: Implements {@link org.w3c.dom.NodeList#item(int)}.
ExtendedNoderemove(ExtendedNode n)
Removes the given node from the tree.
ExtendedNodereplace(ExtendedNode n, ExtendedNode o)
Replaces a node in the tree by an other.

Field Detail

children

protected int children
The number of children.

firstChild

protected ExtendedNode firstChild
The first child.

lastChild

protected ExtendedNode lastChild
The last child.

Constructor Detail

ChildNodes

public ChildNodes()
Creates a new ChildNodes object.

Method Detail

append

public ExtendedNode append(ExtendedNode n)
Appends a node to the tree. The node is assumed not to be a DocumentFragment instance.

getLength

public int getLength()
DOM: Implements {@link org.w3c.dom.NodeList#getLength()}.

Returns: {@link #children}.

insert

public ExtendedNode insert(ExtendedNode n, ExtendedNode r)
Inserts a node in the tree.

item

public Node item(int index)
DOM: Implements {@link org.w3c.dom.NodeList#item(int)}.

remove

public ExtendedNode remove(ExtendedNode n)
Removes the given node from the tree.

replace

public ExtendedNode replace(ExtendedNode n, ExtendedNode o)
Replaces a node in the tree by an other.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.