net.sf.saxon.expr

Class ValueTailIterator

public class ValueTailIterator extends Object implements SequenceIterator, GroundedIterator, LookaheadIterator

ValueTailIterator iterates over a base sequence starting at an element other than the first. It is used in the case where the base sequence is "grounded", that is, it exists in memory and supports efficient direct addressing.
Constructor Summary
ValueTailIterator(GroundedValue base, int start)
Construct a ValueTailIterator
Method Summary
voidclose()
Itemcurrent()
SequenceIteratorgetAnother()
intgetProperties()
Get properties of this iterator, as a bit-significant integer.
booleanhasNext()
GroundedValuematerialize()
Return a Value containing all the items in the sequence returned by this SequenceIterator.
Itemnext()
intposition()

Constructor Detail

ValueTailIterator

public ValueTailIterator(GroundedValue base, int start)
Construct a ValueTailIterator

Parameters: base The items to be filtered start The position of the first item to be included (zero-based)

Throws: XPathException

Method Detail

close

public void close()

current

public Item current()

getAnother

public SequenceIterator getAnother()

getProperties

public int getProperties()
Get properties of this iterator, as a bit-significant integer.

Returns: the properties of this iterator. This will be some combination of properties such as ValueTailIterator, ValueTailIterator, and ValueTailIterator. It is always acceptable to return the value zero, indicating that there are no known special properties. It is acceptable for the properties of the iterator to change depending on its state.

hasNext

public boolean hasNext()

materialize

public GroundedValue materialize()
Return a Value containing all the items in the sequence returned by this SequenceIterator. This should be an "in-memory" value, not a Closure.

Returns: the corresponding Value

next

public Item next()

position

public int position()