public class JDOMNodeIterator extends java.lang.Object implements NodeIterator
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
child |
private java.util.List |
children |
private int |
index |
private NodeTest |
nodeTest |
private NodePointer |
parent |
private int |
position |
private boolean |
reverse |
Constructor and Description |
---|
JDOMNodeIterator(NodePointer parent,
NodeTest nodeTest,
boolean reverse,
NodePointer startWith)
Create a new JDOMNodeIterator.
|
Modifier and Type | Method and Description |
---|---|
NodePointer |
getNodePointer()
Get the NodePointer at the current position.
|
int |
getPosition()
Get the current iterator position.
|
private boolean |
next()
Iterate to next pointer.
|
private boolean |
previous()
This is actually never invoked during the normal evaluation
of xpaths - an iterator is always going forward, never backwards.
|
boolean |
setPosition(int position)
Set the new current position.
|
private boolean |
testChild()
Test a child node.
|
private NodePointer parent
private NodeTest nodeTest
private boolean reverse
private int position
private int index
private java.util.List children
private java.lang.Object child
public JDOMNodeIterator(NodePointer parent, NodeTest nodeTest, boolean reverse, NodePointer startWith)
parent
- pointernodeTest
- testreverse
- whether to iterate in reversestartWith
- starting pointerpublic NodePointer getNodePointer()
NodeIterator
getNodePointer
in interface NodeIterator
public int getPosition()
NodeIterator
getPosition
in interface NodeIterator
public boolean setPosition(int position)
NodeIterator
setPosition
in interface NodeIterator
position
- the position to settrue
if there is a node at position
.private boolean previous()
private boolean next()
private boolean testChild()