net.sf.saxon.expr
public class FilterIterator extends Object implements SequenceIterator
Nested Class Summary | |
---|---|
static class | FilterIterator.Leading
Subclass to support the extension function saxon:leading, which terminates
the iteration at the first item whose predicate is false |
static class | FilterIterator.NonNumeric
Subclass to handle the common special case where it is statically known
that the filter cannot return a numeric value |
Field Summary | |
---|---|
protected SequenceIterator | base |
protected Expression | filter |
protected XPathContext | filterContext |
Constructor Summary | |
---|---|
FilterIterator(SequenceIterator base, Expression filter, XPathContext context)
Constructor |
Method Summary | |
---|---|
Item | current() |
SequenceIterator | getAnother()
Get another iterator to return the same nodes |
protected Item | getNextMatchingItem()
Get the next node that matches the filter predicate if there is one,
or null if not. |
int | getProperties()
Get properties of this iterator, as a bit-significant integer.
|
protected boolean | matches()
Determine whether the context item matches the filter predicate |
Item | next()
Get the next item if there is one |
int | position() |
Parameters: base An iteration of the items to be filtered filter The expression defining the filter predicate context The context in which the expression is being evaluated
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.