|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaxen.dom.DocumentNavigator.NodeIterator
abstract class DocumentNavigator.NodeIterator
A generic iterator over DOM nodes.
Concrete subclasses must implement the getFirstNode(org.w3c.dom.Node)
and getNextNode(org.w3c.dom.Node) methods for a specific iteration
strategy.
| Field Summary | |
|---|---|
private org.w3c.dom.Node |
node
|
| Constructor Summary | |
|---|---|
DocumentNavigator.NodeIterator(org.w3c.dom.Node contextNode)
Constructor. |
|
| Method Summary | |
|---|---|
protected abstract org.w3c.dom.Node |
getFirstNode(org.w3c.dom.Node contextNode)
Get the first node for iteration. |
protected abstract org.w3c.dom.Node |
getNextNode(org.w3c.dom.Node contextNode)
Get the next node for iteration. |
boolean |
hasNext()
|
private boolean |
isXPathNode(org.w3c.dom.Node node)
Test whether a DOM node is usable by XPath. |
java.lang.Object |
next()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.w3c.dom.Node node
| Constructor Detail |
|---|
public DocumentNavigator.NodeIterator(org.w3c.dom.Node contextNode)
contextNode - the starting node| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
remove in interface java.util.Iteratorprotected abstract org.w3c.dom.Node getFirstNode(org.w3c.dom.Node contextNode)
This method must derive an initial node for iteration from a context node.
contextNode - the starting node
getNextNode(org.w3c.dom.Node)protected abstract org.w3c.dom.Node getNextNode(org.w3c.dom.Node contextNode)
This method must locate a following node from the current context node.
contextNode - the current node in the iteration
getFirstNode(org.w3c.dom.Node)private boolean isXPathNode(org.w3c.dom.Node node)
node - the DOM node to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||