Class BasicNodeIter

All Implemented Interfaces:
Iterable<ANode>
Direct Known Subclasses:
DBNodeIter

public abstract class BasicNodeIter extends NodeIter implements Iterable<ANode>
Basic node iterator, throwing no exceptions. This class also implements the Iterable interface, which is why all of its values can also be retrieved via enhanced for(for-each) loops. Note, however, that the next() method will give you better performance.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • EMPTY

      public static final BasicNodeIter EMPTY
      Empty iterator.
  • Constructor Details

    • BasicNodeIter

      public BasicNodeIter()
  • Method Details

    • next

      public abstract ANode next()
      Description copied from class: Iter
      Returns the next item.
      Specified by:
      next in class NodeIter
      Returns:
      resulting item, or null if all items have been returned
    • iterator

      public final Iterator<ANode> iterator()
      Specified by:
      iterator in interface Iterable<ANode>