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 JavaIterator
over the same nodes as thisAxisIterator
.default void
forEachNode
(Consumer<? super NodeInfo> consumer) next()
Get the next item in the sequence.Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, forEachOrFail, getProperties, materialize
Methods inherited from interface net.sf.saxon.tree.iter.UnfailingIterator
forEach, toList
-
Method Details
-
next
NodeInfo next()Description copied from interface:UnfailingIterator
Get the next item in the sequence.- Specified by:
next
in interfaceSequenceIterator
- Specified by:
next
in interfaceUnfailingIterator
- Returns:
- the next Item. If there are no more items, return null.
-
asIterator
Get a JavaIterator
over 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 originalAxisIterator
left off- Returns:
- a Java
Iterator
over the same nodes as thisAxisIterator
.
-
forEachNode
-