Class RangeIterator

java.lang.Object
net.sf.saxon.expr.RangeIterator
All Implemented Interfaces:
Closeable, AutoCloseable, LastPositionFinder, SequenceIterator, AtomicIterator<IntegerValue>, GroundedIterator, LookaheadIterator, ReversibleIterator, UnfailingIterator

An Iterator that produces numeric values in a monotonic sequence, ascending or descending. Although a range expression (N to M) is always in ascending order, applying the reverse() function will produce a RangeIterator that works in descending order.
  • Field Details

    • start

      long start
    • currentValue

      long currentValue
    • limit

      long limit
  • Constructor Details

    • RangeIterator

      public RangeIterator(long start, long end)
      Create an iterator over a range of monotonically increasing integers
      Parameters:
      start - the first integer in the sequence
      end - the last integer in the sequence. Must be >= start.
  • Method Details