public class ChildContext extends EvalContext
| Modifier and Type | Field and Description |
|---|---|
private NodeIterator |
iterator |
private NodeTest |
nodeTest |
private boolean |
reverse |
private boolean |
startFromParentLocation |
parentContext, position, rootContext| Constructor and Description |
|---|
ChildContext(EvalContext parentContext,
NodeTest nodeTest,
boolean startFromParentLocation,
boolean reverse)
Create a new ChildContext.
|
| Modifier and Type | Method and Description |
|---|---|
NodePointer |
getCurrentNodePointer()
Returns the current context node.
|
Pointer |
getSingleNodePointer()
This method is called on the last context on the path when only
one value is needed.
|
boolean |
nextNode()
Returns true if there is another object in the current set.
|
private void |
prepare()
Allocates a PropertyIterator.
|
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, getDocumentOrder, getJXPathContext, getNodeSet, getPosition, getRootContext, getValue, hasNext, isChildOrderingRequired, next, nextSet, remove, sortPointers, toStringprivate NodeTest nodeTest
private boolean startFromParentLocation
private boolean reverse
private NodeIterator iterator
public ChildContext(EvalContext parentContext, NodeTest nodeTest, boolean startFromParentLocation, boolean reverse)
parentContext - parent EvalContextnodeTest - NodeTeststartFromParentLocation - whether to start from parent locationreverse - whether to iterate in reversepublic NodePointer getCurrentNodePointer()
EvalContextgetCurrentNodePointer in class EvalContextpublic Pointer getSingleNodePointer()
getSingleNodePointer in class EvalContextpublic boolean nextNode()
EvalContextnextNode in class EvalContextpublic void reset()
EvalContextreset in class EvalContextpublic boolean setPosition(int position)
EvalContextsetPosition in class EvalContextposition - to setprivate void prepare()