net.sf.saxon.expr
public class FilterIterator extends Object implements SequenceIterator
Nested Class Summary | |
---|---|
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 | |
---|---|
void | close() |
Item | current() |
SequenceIterator | getAnother()
Get another iterator to return the same nodes |
protected Item | getNextMatchingItem()
Get the next item in the base sequence that matches the filter predicate
if there is such an item, 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 next item that matches the predicate
Returns: the properties of this iterator. This will be some combination of properties such as GROUNDED, LAST_POSITION_FINDER, and 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.
Returns: true if the context item matches