public class BigRangeIterator extends RangeIterator implements AtomicIterator, LastPositionFinder, LookaheadIterator
| Constructor and Description |
|---|
BigRangeIterator(java.math.BigInteger start,
java.math.BigInteger step,
java.math.BigInteger end)
Create an iterator over a range of monotonically increasing integers
|
| Modifier and Type | Method and Description |
|---|---|
IntegerValue |
getFirst() |
IntegerValue |
getLast() |
int |
getLength()
Get the last position (that is, the number of items in the sequence).
|
IntegerValue |
getMax() |
IntegerValue |
getMin() |
GroundedValue |
getResidue()
Return a GroundedValue containing all the remaining items in the sequence returned by this
SequenceIterator, starting at the current position.
|
IntegerValue |
getStep()
Get the increment between successive values.
|
boolean |
hasNext()
Determine whether there are more items to come.
|
boolean |
isActuallyGrounded()
Ask if the iterator is actually grounded.
|
IntegerValue |
next()
Get the next atomic value in the sequence.
|
boolean |
supportsGetLength()
Ask whether this iterator supports use of the
LastPositionFinder.getLength() method. |
boolean |
supportsHasNext()
Ask whether the hasNext() method can be called.
|
containsEqclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, dischargematerializepublic BigRangeIterator(java.math.BigInteger start,
java.math.BigInteger step,
java.math.BigInteger end)
throws XPathException
start - the first integer in the sequencestep - the increment: negative for descending sequenceend - the last integer in the sequence. Must be >= start if ascending, or <= if descending.XPathException - if the max sequence length is exceededpublic GroundedValue getResidue()
getResidue in interface GroundedIteratorgetResidue in class RangeIteratorUncheckedXPathException - in the cases of subclasses (such as the iterator over a MemoClosure)
which cause evaluation of expressions while materializing the value.public IntegerValue getFirst()
getFirst in class RangeIteratorpublic IntegerValue getLast()
getLast in class RangeIteratorpublic IntegerValue getMin()
getMin in class RangeIteratorpublic IntegerValue getMax()
getMax in class RangeIteratorpublic IntegerValue getStep()
getStep in class RangeIteratorpublic boolean supportsHasNext()
LookaheadIteratorsupportsHasNext in interface LookaheadIteratorLookaheadIterator.hasNext() method is availablepublic boolean hasNext()
LookaheadIteratorThis method must not be called unless the result of LookaheadIterator.supportsHasNext()
is true.
hasNext in interface LookaheadIteratorpublic IntegerValue next()
AtomicIteratornext in interface SequenceIteratornext in interface AtomicIteratorpublic boolean supportsGetLength()
LastPositionFinderLastPositionFinder.getLength() method. This
method should always be called before calling LastPositionFinder.getLength(), because an iterator
that implements this interface may support use of LastPositionFinder.getLength() in some situations
and not in otherssupportsGetLength in interface LastPositionFinderLastPositionFinder.getLength() method can be called to determine the length
of the underlying sequence.public int getLength()
LastPositionFinderLastPositionFinder.supportsGetLength() has been called
and has returned true.getLength in interface LastPositionFinderpublic boolean isActuallyGrounded()
GroundedIteratorGroundedIterator.materialize() or GroundedIterator.getResidue(), because the iterator might
be grounded under some conditions and not others (usually when it delegates
to another iterator)isActuallyGrounded in interface GroundedIteratorCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.