net.sf.saxon.functions

Class Remove.RemoveIterator

Enclosing Class:
Remove
Implemented Interfaces:
LastPositionFinder, SequenceIterator

public static class Remove.RemoveIterator
extends java.lang.Object
implements SequenceIterator, LastPositionFinder

An implementation of SequenceIterator that returns all items except the one at a specified position.

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

GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD

Constructor Summary

RemoveIterator(SequenceIterator base, int removePosition)

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.
Item
next()
int
position()

Constructor Details

RemoveIterator

public RemoveIterator(SequenceIterator base,
                      int removePosition)

Method Details

current

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

getAnother

public SequenceIterator getAnother()
            throws XPathException
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). This method is non-destructive: it does not change the state of the iterator. The result is undefined if the next() method of the iterator has already returned null.
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, SequenceIterator.LAST_POSITION_FINDER, and SequenceIterator.LOOKAHEAD. 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.

next

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

position

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