org.apache.excalibur.xml.xpath
Class NodeListImpl

java.lang.Object
  extended byorg.apache.excalibur.xml.xpath.NodeListImpl
All Implemented Interfaces:
org.w3c.dom.NodeList

public class NodeListImpl
extends java.lang.Object
implements org.w3c.dom.NodeList

Implementation of the NodeList interface.

Version:
CVS $Id: NodeListImpl.java,v 1.4 2004/02/28 11:47:15 cziegeler Exp $
Author:
Avalon Development Team

Constructor Summary
NodeListImpl()
          Constructor
NodeListImpl(org.w3c.dom.DocumentFragment fragment, java.lang.String rootName)
          Construct a NodeList by copying.
NodeListImpl(org.w3c.dom.Node[] nodes)
          Constructor
NodeListImpl(org.w3c.dom.NodeList list)
          Construct a NodeList by copying.
 
Method Summary
 void addNode(org.w3c.dom.Node node)
          Add a node to list
 int getLength()
          The number of nodes in the list.
 org.w3c.dom.Node item(int index)
          Returns the index th item in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeListImpl

public NodeListImpl(org.w3c.dom.NodeList list)
Construct a NodeList by copying.


NodeListImpl

public NodeListImpl(org.w3c.dom.Node[] nodes)
Constructor


NodeListImpl

public NodeListImpl()
Constructor


NodeListImpl

public NodeListImpl(org.w3c.dom.DocumentFragment fragment,
                    java.lang.String rootName)
Construct a NodeList by copying.

Method Detail

addNode

public void addNode(org.w3c.dom.Node node)
Add a node to list


item

public org.w3c.dom.Node item(int index)
Returns the index th item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null .

Specified by:
item in interface org.w3c.dom.NodeList
Parameters:
index - Index into the collection.
Returns:
The node at the index th position in the NodeList , or null if that is not a valid index.

getLength

public int getLength()
The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.

Specified by:
getLength in interface org.w3c.dom.NodeList


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.