Class ReverseListIterator
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.iterators.ReverseListIterator
- All Implemented Interfaces:
Closeable,AutoCloseable,net.sf.saxon.om.SequenceIterator,net.sf.saxon.tree.iter.AxisIterator,net.sf.saxon.tree.iter.UnfailingIterator
Iterates list in backward direction.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sf.saxon.om.SequenceIterator
net.sf.saxon.om.SequenceIterator.Property -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intCurrent index.private final List<AbstractNode> List of nodes. -
Constructor Summary
ConstructorsConstructorDescriptionReverseListIterator(List<AbstractNode> items) Constructor forReverseListIteratorclass. -
Method Summary
Modifier and TypeMethodDescriptionnet.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, waitMethods inherited from interface net.sf.saxon.tree.iter.AxisIterator
asIterator, forEachNodeMethods inherited from interface net.sf.saxon.om.SequenceIterator
close, forEachOrFail, getProperties, materializeMethods inherited from interface net.sf.saxon.tree.iter.UnfailingIterator
forEach, toList
-
Field Details
-
items
List of nodes. -
index
private int indexCurrent index.
-
-
Constructor Details
-
ReverseListIterator
Constructor forReverseListIteratorclass.- Parameters:
items- the list of nodes.
-
-
Method Details
-
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.
-