Class PrecedingIterator
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.xpath.iterators.PrecedingIterator
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,net.sf.saxon.om.SequenceIterator,net.sf.saxon.tree.iter.AxisIterator,net.sf.saxon.tree.iter.UnfailingIterator
public class PrecedingIterator extends java.lang.Object implements net.sf.saxon.tree.iter.AxisIterator
Recursive-free implementation of the preceding axis iterator.
-
-
Field Summary
Fields Modifier and Type Field Description private net.sf.saxon.tree.iter.AxisIteratorancestorEnumAncestor axis iterator.private net.sf.saxon.tree.iter.AxisIteratordescendantEnumDescendant axis iterator.private net.sf.saxon.tree.iter.AxisIteratorpreviousSiblingEnumPreceding-sibling axis iterator.
-
Constructor Summary
Constructors Constructor Description PrecedingIterator(net.sf.saxon.om.NodeInfo start)Create an iterator over the "preceding" axis.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.saxon.om.NodeInfonext()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
-
-
-
-
Field Detail
-
ancestorEnum
private final net.sf.saxon.tree.iter.AxisIterator ancestorEnum
Ancestor axis iterator.
-
previousSiblingEnum
private net.sf.saxon.tree.iter.AxisIterator previousSiblingEnum
Preceding-sibling axis iterator.
-
descendantEnum
private net.sf.saxon.tree.iter.AxisIterator descendantEnum
Descendant axis iterator.
-
-
Constructor Detail
-
PrecedingIterator
public PrecedingIterator(net.sf.saxon.om.NodeInfo start)
Create an iterator over the "preceding" axis.- Parameters:
start- the initial context node.
-
-
Method Detail
-
next
public net.sf.saxon.om.NodeInfo next()
Get the next item in the sequence.- Specified by:
nextin interfacenet.sf.saxon.tree.iter.AxisIterator- Specified by:
nextin interfacenet.sf.saxon.om.SequenceIterator- Specified by:
nextin interfacenet.sf.saxon.tree.iter.UnfailingIterator- Returns:
- the next Item. If there are no more nodes, return null.
-
-