public class DOMNodeIterator extends java.lang.Object implements NodeIterator
Modifier and Type | Field and Description |
---|---|
private org.w3c.dom.Node |
child |
private org.w3c.dom.Node |
node |
private NodeTest |
nodeTest |
private NodePointer |
parent |
private int |
position |
private boolean |
reverse |
Constructor and Description |
---|
DOMNodeIterator(NodePointer parent,
NodeTest nodeTest,
boolean reverse,
NodePointer startWith)
Create a new DOMNodeIterator.
|
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()
Set the next position.
|
private boolean |
previous()
Set the previous position.
|
boolean |
setPosition(int position)
Set the new current position.
|
private boolean |
testChild()
Test child.
|
private NodePointer parent
private NodeTest nodeTest
private org.w3c.dom.Node node
private org.w3c.dom.Node child
private boolean reverse
private int position
public DOMNodeIterator(NodePointer parent, NodeTest nodeTest, boolean reverse, NodePointer startWith)
parent
- 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()