org.apache.batik.dom
Class AbstractParentNode.ChildNodes

java.lang.Object
  |
  +--org.apache.batik.dom.AbstractParentNode.ChildNodes
All Implemented Interfaces:
NodeList, java.io.Serializable
Enclosing class:
AbstractParentNode

protected class AbstractParentNode.ChildNodes
extends java.lang.Object
implements NodeList, java.io.Serializable

To manage the children of this node.

See Also:
Serialized Form

Field Summary
protected  int children
          The number of children.
protected  ExtendedNode firstChild
          The first child.
protected  ExtendedNode lastChild
          The last child.
 
Constructor Summary
AbstractParentNode.ChildNodes()
          Creates a new ChildNodes object.
 
Method Summary
 ExtendedNode append(ExtendedNode n)
          Appends a node to the tree.
 int getLength()
          DOM: Implements NodeList.getLength().
 ExtendedNode insert(ExtendedNode n, ExtendedNode r)
          Inserts a node in the tree.
 Node item(int index)
          DOM: Implements NodeList.item(int).
 ExtendedNode remove(ExtendedNode n)
          Removes the given node from the tree.
 ExtendedNode replace(ExtendedNode n, ExtendedNode o)
          Replaces a node in the tree by an other.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstChild

protected ExtendedNode firstChild
The first child.

lastChild

protected ExtendedNode lastChild
The last child.

children

protected int children
The number of children.
Constructor Detail

AbstractParentNode.ChildNodes

public AbstractParentNode.ChildNodes()
Creates a new ChildNodes object.
Method Detail

item

public Node item(int index)
DOM: Implements NodeList.item(int).
Specified by:
item in interface NodeList
Following copied from interface: org.w3c.dom.NodeList
Parameters:
indexIndex - into the collection.
Returns:
The node at the indexth position in the NodeList, or null if that is not a valid index.

getLength

public int getLength()
DOM: Implements NodeList.getLength().
Specified by:
getLength in interface NodeList
Returns:
children.

append

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

insert

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

replace

public ExtendedNode replace(ExtendedNode n,
                            ExtendedNode o)
Replaces a node in the tree by an other.

remove

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


Copyright © 2002 Apache Software Foundation. All Rights Reserved.