Interface AxisIterator

All Superinterfaces:
AutoCloseable, Closeable, SequenceIterator, UnfailingIterator
All Known Implementing Classes:
AncestorEnumeration, AncestorIterator, ArrayIterator.OfNodes, AttributeAxisIterator, AttributeIterator, ChildEnumeration, ConcatenatingAxisIterator, DescendantIterator, DescendantIteratorSansText, FollowingEnumeration, FollowingIterator, FollowingSiblingEnumeration, ListIterator.OfNodes, NamedChildIterator, Navigator.AncestorEnumeration, Navigator.AxisFilter, Navigator.DescendantEnumeration, Navigator.EmptyTextFilter, Navigator.FollowingEnumeration, Navigator.PrecedingEnumeration, NodeWrappingAxisIterator, PrecedingEnumeration, PrecedingIterator, PrecedingOrAncestorEnumeration, PrecedingSiblingEnumeration, PrecedingSiblingIterator, PrependAxisIterator, SiblingIterator, SingleNodeIterator, SteppingNavigator.DescendantAxisIterator, TreeEnumeration, VirtualCopy.VirtualCopier, WrappingIterator

public interface AxisIterator extends UnfailingIterator
A SequenceIterator is used to iterate over a sequence of items. An AxisIterator is a SequenceIterator that throws no exceptions, and that always returns nodes. The nodes should all be in the same document (though there are some cases, such as PrependIterator, where this is the responsibility of the user of the class and is not enforced.)
  • Method Details

    • next

      NodeInfo next()
      Description copied from interface: UnfailingIterator
      Get the next item in the sequence.
      Specified by:
      next in interface SequenceIterator
      Specified by:
      next in interface UnfailingIterator
      Returns:
      the next Item. If there are no more items, return null.
    • asIterator

      default Iterator<NodeInfo> asIterator()
      Get a Java Iterator over the same nodes as this AxisIterator. This is normally called when the iterator is positioned at the start; in principle, however, it can be called at any point in the iteration. The Java iterator picks up where the original AxisIterator left off
      Returns:
      a Java Iterator over the same nodes as this AxisIterator.
    • forEachNode

      default void forEachNode(Consumer<? super NodeInfo> consumer)