NodeIteratorpublic class DOMNodeIterator extends java.lang.Object implements NodeIterator
| Modifier and Type | Field | 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 | Description |
|---|---|
DOMNodeIterator(NodePointer parent,
NodeTest nodeTest,
boolean reverse,
NodePointer startWith) |
Create a new DOMNodeIterator.
|
| Modifier and Type | Method | 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()
NodeIteratorgetNodePointer in interface NodeIteratorpublic int getPosition()
NodeIteratorgetPosition in interface NodeIteratorpublic boolean setPosition(int position)
NodeIteratorsetPosition in interface NodeIteratorposition - the position to settrue if there is a node at position.private boolean previous()
private boolean next()
private boolean testChild()