com.icl.saxon.expr
Class LookaheadEnumerator
java.lang.Object
com.icl.saxon.expr.LookaheadEnumerator
- LastPositionFinder, NodeEnumeration
public class LookaheadEnumerator
extends java.lang.Object
A LookaheadEnumerator passes the nodes from a base enumerator throgh unchanged.
The complication is that on request, it must determine the value of the last() position,
which requires a lookahead.
A LookaheadEnumerator should only be used to wrap a NodeEnumeration that cannot
determine the last() position for itself, i.e. one that is not a LastPositionFinder.
int | getLastPosition() - Do lookahead to find the last position, if required
|
boolean | hasMoreElements() - Determine whether there are any more nodes to hand to the client
|
boolean | isPeer() - Determine whether the nodes are guaranteed to be peers
|
boolean | isReverseSorted()
|
boolean | isSorted() - Determine whether the nodes are guaranteed to be in document order
|
NodeInfo | nextElement() - Hand the next node to the client
|
LookaheadEnumerator
public LookaheadEnumerator(NodeEnumeration base)
Constructor
base
- An NodeEnumerator that delivers the nodes, but that cannot determine the
last position count.
hasMoreElements
public boolean hasMoreElements()
Determine whether there are any more nodes to hand to the client
- hasMoreElements in interface NodeEnumeration
isPeer
public boolean isPeer()
Determine whether the nodes are guaranteed to be peers
- isPeer in interface NodeEnumeration
isSorted
public boolean isSorted()
Determine whether the nodes are guaranteed to be in document order
- isSorted in interface NodeEnumeration