Class ReverseListIterator

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, net.sf.saxon.om.SequenceIterator, net.sf.saxon.tree.iter.AxisIterator

    public class ReverseListIterator
    extends java.lang.Object
    implements net.sf.saxon.tree.iter.AxisIterator
    Iterates list in backward direction.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int index
      Current index.
      private java.util.List<? extends net.sf.saxon.om.NodeInfo> items
      List of nodes.
    • Constructor Summary

      Constructors 
      Constructor Description
      ReverseListIterator​(java.util.List<? extends net.sf.saxon.om.NodeInfo> items)
      Constructor for ReverseListIterator class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      net.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.om.SequenceIterator

        close, discharge
    • Field Detail

      • items

        private final java.util.List<? extends net.sf.saxon.om.NodeInfo> items
        List of nodes.
      • index

        private int index
        Current index.
    • Constructor Detail

      • ReverseListIterator

        public ReverseListIterator​(java.util.List<? extends net.sf.saxon.om.NodeInfo> items)
        Constructor for ReverseListIterator class.
        Parameters:
        items - the list of nodes.
    • Method Detail

      • next

        public net.sf.saxon.om.NodeInfo next()
        Get the next item in the sequence.
        Specified by:
        next in interface net.sf.saxon.tree.iter.AxisIterator
        Specified by:
        next in interface net.sf.saxon.om.SequenceIterator
        Returns:
        the next Item. If there are no more nodes, return null.