public class AncestorContext extends EvalContext
| Modifier and Type | Field and Description |
|---|---|
private NodePointer |
currentNodePointer |
private boolean |
includeSelf |
private NodeTest |
nodeTest |
private boolean |
setStarted |
parentContext, position, rootContext| Constructor and Description |
|---|
AncestorContext(EvalContext parentContext,
boolean includeSelf,
NodeTest nodeTest)
Create a new AncestorContext.
|
| Modifier and Type | Method and Description |
|---|---|
NodePointer |
getCurrentNodePointer()
Returns the current context node.
|
int |
getDocumentOrder()
Determines the document order for this context.
|
boolean |
nextNode()
Returns true if there is another object in the current set.
|
void |
reset()
Sets current position = 0, which is the pre-iteration state.
|
boolean |
setPosition(int position)
Moves the current position to the specified index.
|
getContextNodeList, getContextNodePointer, getCurrentPosition, getJXPathContext, getNodeSet, getPosition, getRootContext, getSingleNodePointer, getValue, hasNext, isChildOrderingRequired, next, nextSet, remove, sortPointers, toStringprivate NodeTest nodeTest
private boolean setStarted
private NodePointer currentNodePointer
private boolean includeSelf
public AncestorContext(EvalContext parentContext, boolean includeSelf, NodeTest nodeTest)
parentContext - represents the previous step on the pathincludeSelf - differentiates between "ancestor::" and
"ancestor-or-self::" axesnodeTest - is the name of the element(s) we are looking forpublic NodePointer getCurrentNodePointer()
EvalContextgetCurrentNodePointer in class EvalContextpublic int getDocumentOrder()
EvalContextgetDocumentOrder in class EvalContextpublic void reset()
EvalContextreset in class EvalContextpublic boolean setPosition(int position)
EvalContextsetPosition in class EvalContextposition - to setpublic boolean nextNode()
EvalContextnextNode in class EvalContext