Package groovy.xml.slurpersupport

# Class NodeIterator

java.lang.Object
groovy.xml.slurpersupport.NodeIterator

All Implemented Interfaces:
  `Iterator`

public abstract class NodeIterator extends Object implements Iterator
Helper class for iterating through nodes.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NodeIterator(Iterator iter)`
  Creates a filtering iterator over another iterator of candidate nodes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract Object`
  `getNextNode(Iterator iter)`
  Returns the next node visible to callers, or `null` when iteration is exhausted.
  `boolean`
  `hasNext()`
  `Object`
  `next()`
  `void`
  `remove()`

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

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

  ### Methods inherited from interface java.util.Iterator

  `forEachRemaining`

- ## Constructor Details

  - ### NodeIterator

    public NodeIterator(Iterator iter)
    Creates a filtering iterator over another iterator of candidate nodes.
    Parameters:
      `iter` - source iterator

- ## Method Details

  - ### hasNext

    public boolean hasNext()
    Specified by:
      `hasNext` in interface `Iterator`

  - ### next

    public Object next()
    Specified by:
      `next` in interface `Iterator`

  - ### remove

    public void remove()
    Specified by:
      `remove` in interface `Iterator`

  - ### getNextNode

    protected abstract Object getNextNode(Iterator iter)
    Returns the next node visible to callers, or `null` when iteration is exhausted.
    Parameters:
      `iter` - source iterator
    Returns:
      next matching node or `null`