Class DescendantIterator
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.iterators.DescendantIterator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,net.sf.saxon.om.SequenceIterator
,net.sf.saxon.tree.iter.AxisIterator
,net.sf.saxon.tree.iter.UnfailingIterator
Recursive-free implementation of the descendant axis iterator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum defines starting node for iterator.Nested classes/interfaces inherited from interface net.sf.saxon.om.SequenceIterator
net.sf.saxon.om.SequenceIterator.Property
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate net.sf.saxon.tree.iter.AxisIterator
Descendant axis iterator.private final Queue
<net.sf.saxon.om.NodeInfo> Queue for sibling nodes. -
Constructor Summary
ConstructorsConstructorDescriptionDescendantIterator
(net.sf.saxon.om.NodeInfo start, DescendantIterator.StartWith startWith) Create an iterator over the "descendant" axis. -
Method Summary
Modifier and TypeMethodDescriptionnet.sf.saxon.om.NodeInfo
next()
Get the next item in the sequence.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.tree.iter.AxisIterator
asIterator, forEachNode
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
-
Field Details
-
queue
Queue for sibling nodes. -
descendantEnum
private net.sf.saxon.tree.iter.AxisIterator descendantEnumDescendant axis iterator.
-
-
Constructor Details
-
DescendantIterator
Create an iterator over the "descendant" axis.- Parameters:
start
- the initial context node.startWith
- mode of the iterator, seeDescendantIterator.StartWith
.
-
-
Method Details
-
next
public net.sf.saxon.om.NodeInfo next()Get the next item in the sequence.- Specified by:
next
in interfacenet.sf.saxon.tree.iter.AxisIterator
- Specified by:
next
in interfacenet.sf.saxon.om.SequenceIterator
- Specified by:
next
in interfacenet.sf.saxon.tree.iter.UnfailingIterator
- Returns:
- the next Item. If there are no more nodes, return null.
-