Class FilterEnumerator
java.lang.Object
com.icl.saxon.expr.FilterEnumerator
- All Implemented Interfaces:
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilterEnumerator(NodeEnumeration base, Expression filter, Context context, boolean finishAfterReject) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether there are any more nodes available in the enumerationbooleanisPeer()Determine whether the nodes are guaranteed to be peersbooleanDetermine whether the nodes returned by this enumeration are known to be in reverse document order.booleanisSorted()Determine whether the nodes are guaranteed to be in document orderGet the next node if there is one
-
Field Details
-
min
int min -
max
int max
-
-
Constructor Details
-
FilterEnumerator
public FilterEnumerator(NodeEnumeration base, Expression filter, Context context, boolean finishAfterReject) throws XPathException 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 predicatecontext- The context in which the expression is being evaluatedfinishAfterReject- : terminate enumeration on first failure- Throws:
XPathException
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Test whether there are any more nodes available in the enumeration- Specified by:
hasMoreElementsin interfaceNodeEnumeration- Returns:
- true if there are more nodes
-
nextElement
Get the next node if there is one- Specified by:
nextElementin interfaceNodeEnumeration- Returns:
- the next NodeInfo
- Throws:
XPathException
-
isSorted
public boolean isSorted()Determine whether the nodes are guaranteed to be in document order- Specified by:
isSortedin interfaceNodeEnumeration- Returns:
- true if the nodes are guaranteed to be in document order.
-
isReverseSorted
public boolean isReverseSorted()Description copied from interface:NodeEnumerationDetermine whether the nodes returned by this enumeration are known to be in reverse document order.- Specified by:
isReverseSortedin interfaceNodeEnumeration- Returns:
- true if the nodes are guaranteed to be in document order.
-
isPeer
public boolean isPeer()Determine whether the nodes are guaranteed to be peers- Specified by:
isPeerin interfaceNodeEnumeration
-