Module org.htmlunit

Class DomNode.DescendantDomNodesIterator

java.lang.Object
org.htmlunit.html.DomNode.DescendantDomNodesIterator
All Implemented Interfaces:
Iterator<DomNode>
Enclosing class:
DomNode

protected final class DomNode.DescendantDomNodesIterator extends Object implements Iterator<DomNode>
Iterates over all descendants DomNodes, in document order.
  • Constructor Details

    • DescendantDomNodesIterator

      public DescendantDomNodesIterator()
      Creates a new instance which iterates over the specified node type.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<DomNode>
    • next

      public DomNode next()
      Specified by:
      next in interface Iterator<DomNode>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<DomNode>
    • nextNode

      public DomNode nextNode()
      Returns the next node in the iteration.
      Returns:
      the next node, or null if there are no more nodes