public static class MultiIndex.SelectedItemsIterator extends java.lang.Object implements SequenceIterator, LastPositionFinder, LookaheadIterator
Constructor and Description |
---|
SelectedItemsIterator(GroundedValue indexedValue,
IntSet selection) |
Modifier and Type | Method and Description |
---|---|
int |
getLength()
Get the last position (that is, the number of items in the sequence).
|
boolean |
hasNext()
Determine whether there are more items to come.
|
Item |
next()
Get the next item in the sequence.
|
boolean |
supportsGetLength()
Ask whether this iterator supports use of the
getLength() method. |
boolean |
supportsHasNext()
Ask whether the hasNext() method can be called.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, discharge
public SelectedItemsIterator(GroundedValue indexedValue, IntSet selection)
public boolean supportsHasNext()
LookaheadIterator
supportsHasNext
in interface LookaheadIterator
LookaheadIterator.hasNext()
method is availablepublic boolean hasNext()
This method must not be called unless the result of supportsHasNext()
is true.
hasNext
in interface LookaheadIterator
public Item next()
next
in interface SequenceIterator
public boolean supportsGetLength()
getLength()
method. This
method should always be called before calling getLength()
, because an iterator
that implements this interface may support use of getLength()
in some situations
and not in otherssupportsGetLength
in interface LastPositionFinder
getLength()
method can be called to determine the length
of the underlying sequence.public int getLength()
The result is undefined if the next() method of the iterator has already returned null.
This method must not be called unless the result of supportsGetLength()
is true.
getLength
in interface LastPositionFinder
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.