com.japisoft.fastparser.dom
Class NodeListImpl

java.lang.Object
  |
  +--com.japisoft.fastparser.dom.NodeListImpl
All Implemented Interfaces:
NodeList

public class NodeListImpl
extends java.lang.Object
implements NodeList

Implementation for NodeList

Version:
1.0
Author:
(c) 2002-2003 JAPISOFT

Constructor Summary
NodeListImpl(SimpleNode n)
           
NodeListImpl(SimpleNode n, java.lang.String filter)
           
 
Method Summary
 int getLength()
          The number of nodes in the list.
 Node item(int index)
          Returns the indexth item in the collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeListImpl

public NodeListImpl(SimpleNode n)
Parameters:
n - reference node

NodeListImpl

public NodeListImpl(SimpleNode n,
                    java.lang.String filter)
Parameters:
n - reference node
filter - tag name to find
Method Detail

item

public Node item(int index)
Description copied from interface: NodeList
Returns the indexth 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 NodeList
Parameters:
index - Index into the collection.
Returns:
a node at index or null

getLength

public int getLength()
Description copied from interface: NodeList
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 NodeList
Returns:
the total number of node