net.sf.saxon.expr

Class TailIterator

public class TailIterator extends Object implements SequenceIterator, LastPositionFinder, LookaheadIterator

TailIterator iterates over a base sequence starting at an element other than the first. The base sequence is represented by an iterator which is consumed in the process
Method Summary
voidclose()
Itemcurrent()
SequenceIteratorgetAnother()
intgetLastPosition()
intgetProperties()
Get properties of this iterator, as a bit-significant integer.
booleanhasNext()
static SequenceIteratormake(SequenceIterator base, int start)
Static factory method.
Itemnext()
intposition()

Method Detail

close

public void close()

current

public Item current()

getAnother

public SequenceIterator getAnother()

getLastPosition

public int getLastPosition()

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 TailIterator, TailIterator, and TailIterator. 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()

make

public static SequenceIterator make(SequenceIterator base, int start)
Static factory method. Creates a TailIterator, unless the base Iterator is an ArrayIterator, in which case it optimizes by creating a new ArrayIterator directly over the underlying array. This optimization is important when doing recursion over a node-set using repeated calls of $nodes[position()>1]

Parameters: base An iteration of the items to be filtered start The position of the first item to be included (base 1). If <= 1, the whole of the base sequence is returned

Returns: an iterator over the items in the sequence from the start item to the end of the sequence. The returned iterator will not necessarily be an instance of this class.

next

public Item next()

position

public int position()