Package net.sf.saxon.tree.iter
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
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.)
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sf.saxon.om.SequenceIterator
SequenceIterator.Property -
Method Summary
Modifier and TypeMethodDescriptionGet a JavaIteratorover the same nodes as thisAxisIterator.default voidforEachNode(Consumer<? super NodeInfo> consumer) next()Get the next item in the sequence.Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, forEachOrFail, getProperties, materializeMethods inherited from interface net.sf.saxon.tree.iter.UnfailingIterator
forEach, toList
-
Method Details
-
next
NodeInfo next()Description copied from interface:UnfailingIteratorGet the next item in the sequence.- Specified by:
nextin interfaceSequenceIterator- Specified by:
nextin interfaceUnfailingIterator- Returns:
- the next Item. If there are no more items, return null.
-
asIterator
Get a JavaIteratorover the same nodes as thisAxisIterator. 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 originalAxisIteratorleft off- Returns:
- a Java
Iteratorover the same nodes as thisAxisIterator.
-
forEachNode
-