com.caucho.xml
Class NodeListImpl

java.lang.Object
  extended by com.caucho.xml.NodeListImpl
All Implemented Interfaces:
org.w3c.dom.NodeList

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

Generic implementation of a node list.


Constructor Summary
NodeListImpl()
          Creates an empty node list.
NodeListImpl(java.util.Collection<org.w3c.dom.Node> collection)
          Creates a node list from a collection.
 
Method Summary
 void add(org.w3c.dom.Node node)
          Adds an item.
 int getLength()
          Returns the number of items in the list.
 org.w3c.dom.Node item(int index)
          Returns the item at the index.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeListImpl

public NodeListImpl()
Creates an empty node list.


NodeListImpl

public NodeListImpl(java.util.Collection<org.w3c.dom.Node> collection)
Creates a node list from a collection.

Method Detail

add

public void add(org.w3c.dom.Node node)
Adds an item.


item

public org.w3c.dom.Node item(int index)
Returns the item at the index.

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

getLength

public int getLength()
Returns the number of items in the list.

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object