net.sf.saxon.value

Class MemoClosure.ProgressiveIterator

Enclosing Class:
MemoClosure
Implemented Interfaces:
GroundedIterator, LastPositionFinder, SequenceIterator

public final class MemoClosure.ProgressiveIterator
extends java.lang.Object
implements SequenceIterator, LastPositionFinder, GroundedIterator

A ProgressiveIterator starts by reading any items already held in the reservoir; when the reservoir is exhausted, it reads further items from the inputIterator, copying them into the reservoir as they are read.

Fields inherited from interface net.sf.saxon.om.SequenceIterator

GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD

Constructor Summary

ProgressiveIterator()
Create a ProgressiveIterator

Method Summary

Item
current()
SequenceIterator
getAnother()
int
getLastPosition()
Get the last position (that is, the number of items in the sequence)
int
getProperties()
Get properties of this iterator, as a bit-significant integer.
GroundedValue
materialize()
Return a value containing all the items in the sequence returned by this SequenceIterator
Item
next()
int
position()

Constructor Details

ProgressiveIterator

public ProgressiveIterator()
Create a ProgressiveIterator

Method Details

current

public Item current()
Specified by:
current in interface SequenceIterator

getAnother

public SequenceIterator getAnother()
Specified by:
getAnother in interface SequenceIterator

getLastPosition

public int getLastPosition()
            throws XPathException
Get the last position (that is, the number of items in the sequence)
Specified by:
getLastPosition in interface LastPositionFinder

getProperties

public int getProperties()
Get properties of this iterator, as a bit-significant integer.
Specified by:
getProperties in interface SequenceIterator
Returns:
the properties of this iterator. This will be some combination of properties such as SequenceIterator.GROUNDED and SequenceIterator.LAST_POSITION_FINDER. It is always acceptable to return the value zero, indicating that there are no known special properties.

materialize

public GroundedValue materialize()
            throws XPathException
Return a value containing all the items in the sequence returned by this SequenceIterator
Specified by:
materialize in interface GroundedIterator
Returns:
the corresponding value

next

public Item next()
            throws XPathException
Specified by:
next in interface SequenceIterator

position

public int position()
Specified by:
position in interface SequenceIterator