Package org.htmlunit.html

# Class DomNodeIterator

java.lang.Object
org.htmlunit.html.DomNodeIterator

All Implemented Interfaces:
  `NodeIterator`

public class DomNodeIterator extends Object implements NodeIterator
An implementation of `NodeIterator`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DomNodeIterator(DomNode root, int whatToShow, NodeFilter filter, boolean expandEntityReferences)`
  Creates a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `detach()`
  `boolean`
  `getExpandEntityReferences()`
  `NodeFilter`
  `getFilter()`
  `DomNode`
  `getRoot()`
  `int`
  `getWhatToShow()`
  `boolean`
  `isPointerBeforeReferenceNode()`
  Returns whether the `NodeIterator` is anchored before, or after the node.
  `DomNode`
  `nextNode()`
  `DomNode`
  `previousNode()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DomNodeIterator

    public DomNodeIterator(DomNode root, int whatToShow, NodeFilter filter, boolean expandEntityReferences)
    Creates a new instance.
    Parameters:
      `root` - The root node at which to begin the `NodeIterator`'s traversal
      `whatToShow` - an optional int representing a bitmask created by combining the constant properties of `NodeFilter`
      `filter` - an object implementing the `NodeFilter` interface
      `expandEntityReferences` - If false, the contents of EntityReference nodes are not present in the logical view.

- ## Method Details

  - ### getRoot

    public DomNode getRoot()
    Specified by:
      `getRoot` in interface `NodeIterator`

  - ### getWhatToShow

    public int getWhatToShow()
    Specified by:
      `getWhatToShow` in interface `NodeIterator`

  - ### getExpandEntityReferences

    public boolean getExpandEntityReferences()
    Specified by:
      `getExpandEntityReferences` in interface `NodeIterator`

  - ### getFilter

    public NodeFilter getFilter()
    Specified by:
      `getFilter` in interface `NodeIterator`

  - ### isPointerBeforeReferenceNode

    public boolean isPointerBeforeReferenceNode()
    Returns whether the `NodeIterator` is anchored before, or after the node.
    Returns:
      whether it is anchored before or after the node

  - ### detach

    public void detach()
    Specified by:
      `detach` in interface `NodeIterator`

  - ### nextNode

    public DomNode nextNode()
    Specified by:
      `nextNode` in interface `NodeIterator`

  - ### previousNode

    public DomNode previousNode()
    Specified by:
      `previousNode` in interface `NodeIterator`