public class DOMNodeIterator extends java.lang.Object implements NodeIterator
NodeIterator
interface.Modifier and Type | Field and Description |
---|---|
protected static short |
BACKWARD
The backward state.
|
protected AbstractDocument |
document
The document which created the iterator.
|
protected boolean |
expandEntityReferences
Whether the children of entity reference nodes are visible
to the iterator.
|
protected NodeFilter |
filter
The NodeFilter used to screen nodes.
|
protected static short |
FORWARD
The forward state.
|
protected static short |
INITIAL
The initial state.
|
protected static short |
INVALID
The invalid state.
|
protected Node |
referenceNode
The reference node.
|
protected Node |
root
The root node.
|
protected short |
state
The iterator state.
|
protected int |
whatToShow
Which node types are presented via the iterator.
|
Constructor and Description |
---|
DOMNodeIterator(AbstractDocument doc,
Node n,
int what,
NodeFilter nf,
boolean exp)
Creates a new NodeIterator object.
|
Modifier and Type | Method and Description |
---|---|
void |
detach()
DOM: Implements
NodeIterator.detach() . |
boolean |
getExpandEntityReferences()
DOM: Implements
NodeIterator.getExpandEntityReferences() . |
NodeFilter |
getFilter()
DOM: Implements
NodeIterator.getFilter() . |
Node |
getRoot()
DOM: Implements
NodeIterator.getRoot() . |
int |
getWhatToShow()
DOM: Implements
NodeIterator.getWhatToShow() . |
Node |
nextNode()
DOM: Implements
NodeIterator.nextNode() . |
void |
nodeToBeRemoved(Node removedNode)
Called by the DOM when a node will be removed from the current document.
|
Node |
previousNode()
DOM: Implements
NodeIterator.previousNode() . |
protected void |
unfilteredNextNode()
Sets the reference node to the next node, unfiltered.
|
protected void |
unfilteredPreviousNode()
Sets the reference node to the previous node, unfiltered.
|
protected static final short INITIAL
protected static final short INVALID
protected static final short FORWARD
protected static final short BACKWARD
protected AbstractDocument document
protected Node root
protected int whatToShow
protected NodeFilter filter
protected boolean expandEntityReferences
protected short state
protected Node referenceNode
public DOMNodeIterator(AbstractDocument doc, Node n, int what, NodeFilter nf, boolean exp)
doc
- The document which created the tree walker.n
- The root node.what
- Which node types are presented via the iterator.nf
- The NodeFilter used to screen nodes.exp
- Whether the children of entity reference nodes are visible
to the iterator.public Node getRoot()
NodeIterator.getRoot()
.getRoot
in interface NodeIterator
public int getWhatToShow()
NodeIterator.getWhatToShow()
.getWhatToShow
in interface NodeIterator
public NodeFilter getFilter()
NodeIterator.getFilter()
.getFilter
in interface NodeIterator
public boolean getExpandEntityReferences()
NodeIterator.getExpandEntityReferences()
.getExpandEntityReferences
in interface NodeIterator
public Node nextNode()
NodeIterator.nextNode()
.nextNode
in interface NodeIterator
public Node previousNode()
NodeIterator.previousNode()
.previousNode
in interface NodeIterator
public void detach()
NodeIterator.detach()
.detach
in interface NodeIterator
public void nodeToBeRemoved(Node removedNode)
protected void unfilteredNextNode()
protected void unfilteredPreviousNode()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.