public class LookaheadEnumerator extends Object implements NodeEnumeration, LastPositionFinder
Constructor and Description |
---|
LookaheadEnumerator(NodeEnumeration base)
Constructor
|
Modifier and Type | Method and Description |
---|---|
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()
Determine whether the nodes returned by this enumeration are known to be in
reverse document order.
|
boolean |
isSorted()
Determine whether the nodes are guaranteed to be in document order
|
NodeInfo |
nextElement()
Hand the next node to the client
|
public LookaheadEnumerator(NodeEnumeration base)
base
- An NodeEnumerator that delivers the nodes, but that cannot determine the
last position count.public boolean hasMoreElements()
hasMoreElements
in interface NodeEnumeration
public NodeInfo nextElement() throws XPathException
nextElement
in interface NodeEnumeration
XPathException
public int getLastPosition() throws XPathException
getLastPosition
in interface LastPositionFinder
XPathException
public boolean isSorted()
isSorted
in interface NodeEnumeration
public boolean isReverseSorted()
NodeEnumeration
isReverseSorted
in interface NodeEnumeration
public boolean isPeer()
isPeer
in interface NodeEnumeration