com.icl.saxon.expr

Class FilterEnumerator

public class FilterEnumerator extends Object implements NodeEnumeration

A FilterEnumerator filters an input NodeEnumeration using a filter expression. The complication is that on request, it must determine the value of the last() position, which requires a lookahead.
Field Summary
intmax
intmin
Constructor Summary
FilterEnumerator(NodeEnumeration base, Expression filter, Context context, boolean finishAfterReject)
Constructor
Method Summary
booleanhasMoreElements()
Test whether there are any more nodes available in the enumeration
booleanisPeer()
Determine whether the nodes are guaranteed to be peers
booleanisReverseSorted()
booleanisSorted()
Determine whether the nodes are guaranteed to be in document order
NodeInfonextElement()
Get the next node if there is one

Field Detail

max

int max

min

int min

Constructor Detail

FilterEnumerator

public FilterEnumerator(NodeEnumeration base, Expression filter, Context context, boolean finishAfterReject)
Constructor

Parameters: base A node-set expression denoting the absolute or relative set of nodes from which the navigation path should start. filter The expression defining the filter predicate context The context in which the expression is being evaluated finishAfterReject: terminate enumeration on first failure

Method Detail

hasMoreElements

public boolean hasMoreElements()
Test whether there are any more nodes available in the enumeration

isPeer

public boolean isPeer()
Determine whether the nodes are guaranteed to be peers

isReverseSorted

public boolean isReverseSorted()

isSorted

public boolean isSorted()
Determine whether the nodes are guaranteed to be in document order

nextElement

public NodeInfo nextElement()
Get the next node if there is one