Class NodeListImpl

java.lang.Object
org.apache.harmony.xml.dom.NodeListImpl
All Implemented Interfaces:
NodeList

public class NodeListImpl
extends Object
implements NodeList
Provides a straightforward implementation of the corresponding W3C DOM interface. The class is used internally only, thus only notable members that are not in the original interface are documented (the W3C docs are quite extensive). Hope that's ok.

Some of the fields may have package visibility, so other classes belonging to the DOM implementation can easily access them while maintaining the DOM tree structure.

  • Method Details

    • 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
    • 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:
      The node at the indexth position in the NodeList, or null if that is not a valid index.