public static class Reverse.ReverseListIterator extends java.lang.Object implements SequenceIterator, LastPositionFinder, ReversibleIterator
Constructor and Description |
---|
ReverseListIterator(java.util.List<T> list) |
Modifier and Type | Method and Description |
---|---|
int |
getLength()
Get the last position (that is, the number of items in the sequence).
|
SequenceIterator |
getReverseIterator()
Get a new SequenceIterator that returns the same items in reverse order.
|
Item |
next()
Get the next item in the sequence.
|
boolean |
supportsGetLength()
Ask whether this iterator supports use of the
LastPositionFinder.getLength() method. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, discharge
public boolean supportsGetLength()
LastPositionFinder
LastPositionFinder.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 LastPositionFinder
LastPositionFinder.getLength()
method can be called to determine the length
of the underlying sequence.public int getLength()
getLength
in interface LastPositionFinder
public Item next()
next
in interface SequenceIterator
public SequenceIterator getReverseIterator()
getReverseIterator
in interface ReversibleIterator
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.