public static class ListIterator.Of<T extends Item> extends ListIterator
ListIterator.Of<T extends Item>, ListIterator.OfAtomic<A extends AtomicValue>
Constructor and Description |
---|
Of(java.util.List<T> list)
Create a ListIterator over a given List
|
Modifier and Type | Method and Description |
---|---|
int |
getLength()
Get the last position (that is, the number of items in the sequence).
|
GroundedValue |
getResidue()
Return a GroundedValue containing all the remaining items in the sequence returned by this
SequenceIterator, starting at the current position.
|
SequenceIterator |
getReverseIterator()
Get a new SequenceIterator that returns the same items in reverse order.
|
boolean |
hasNext()
Determine whether there are more items to come.
|
boolean |
isActuallyGrounded()
Ask if the iterator is actually grounded.
|
GroundedValue |
materialize()
Return a Sequence containing all the items in the sequence returned by this
SequenceIterator
|
Item |
next()
Get the next item in the sequence.
|
boolean |
supportsGetLength()
Ask whether this iterator supports use of the
LastPositionFinder.getLength() method. |
supportsHasNext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, discharge
public boolean hasNext()
LookaheadIterator
This method must not be called unless the result of LookaheadIterator.supportsHasNext()
is true.
public Item next()
SequenceIterator
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 othersLastPositionFinder.getLength()
method can be called to determine the length
of the underlying sequence.public int getLength()
LastPositionFinder
LastPositionFinder.supportsGetLength()
has been called
and has returned true.public boolean isActuallyGrounded()
GroundedIterator
GroundedIterator.materialize()
or GroundedIterator.getResidue()
, because the iterator might
be grounded under some conditions and not others (usually when it delegates
to another iterator)public GroundedValue materialize()
public GroundedValue getResidue()
GroundedIterator
public SequenceIterator getReverseIterator()
ReversibleIterator
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.