Interface ExtendedNodeList<T extends Node>

All Superinterfaces:
Iterable<T>, NodeList
All Known Subinterfaces:
DOMNodeList, ElementList

public interface ExtendedNodeList<T extends Node> extends NodeList, Iterable<T>
This library's iterable version of the old NodeList.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(Node node)
    Determine whether this list contains the given node.
    boolean
    Check whether this list is empty.
    item(int index)
    Get the node located at the index position in this list.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator

    Methods inherited from interface org.w3c.dom.NodeList

    getLength
  • Method Details

    • contains

      boolean contains(Node node)
      Determine whether this list contains the given node.
      Parameters:
      node - the node to check for.
      Returns:
      true if this list contains the node, false otherwise, even if node is a descendant of the child nodes.
    • item

      T item(int index)
      Get the node located at the index position in this list.

      For better performance, please use an iterator instead of this method.

      Specified by:
      item in interface NodeList
      Returns:
      the node located at the index position in this list, or null if index is less than zero or greater or equal to the number of nodes in this list.
    • isEmpty

      boolean isEmpty()
      Check whether this list is empty.
      Returns:
      true if this list is empty.