public class ValueTailIterator extends java.lang.Object implements SequenceIterator, GroundedIterator, LookaheadIterator
Constructor and Description |
---|
ValueTailIterator(GroundedValue base,
int start)
Construct a ValueTailIterator
|
Modifier and Type | Method and Description |
---|---|
GroundedValue |
getResidue()
Return a GroundedValue containing all the remaining items in the sequence returned by this
SequenceIterator, starting at the current position.
|
boolean |
hasNext()
Determine whether there are more items to come.
|
boolean |
isActuallyGrounded()
Ask if the iterator is actually grounded.
|
GroundedValue |
materialize()
Return a Value containing all the items in the sequence returned by this
SequenceIterator.
|
Item |
next()
Get the next item in the sequence.
|
boolean |
supportsHasNext()
Ask whether the hasNext() method can be called.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, discharge
public ValueTailIterator(GroundedValue base, int start)
base
- The items to be filteredstart
- The position of the first item to be included (zero-based)public Item next()
SequenceIterator
next
in interface SequenceIterator
public boolean supportsHasNext()
LookaheadIterator
supportsHasNext
in interface LookaheadIterator
LookaheadIterator.hasNext()
method is availablepublic boolean hasNext()
LookaheadIterator
This method must not be called unless the result of LookaheadIterator.supportsHasNext()
is true.
hasNext
in interface LookaheadIterator
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)isActuallyGrounded
in interface GroundedIterator
public GroundedValue materialize()
materialize
in interface GroundedIterator
public GroundedValue getResidue()
GroundedIterator
getResidue
in interface GroundedIterator
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.