Class DOMSubTreeData.DelayedNodeIterator
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMSubTreeData.DelayedNodeIterator
- Enclosing class:
- DOMSubTreeData
This is an Iterator that contains a backing node-set that is
not populated until the caller first attempts to advance the iterator.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDereferences a same-document URI fragment.boolean
hasNext()
next()
private void
nodeSetMinusCommentNodes
(Node node, List<Node> nodeSet, Node prevSibling) Recursively traverses the subtree, and returns an XPath-equivalent node-set of all nodes traversed, excluding any comment nodes, if specified.void
remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
root
-
nodeSet
-
li
-
withComments
private boolean withComments
-
-
Constructor Details
-
DelayedNodeIterator
DelayedNodeIterator(Node root, boolean excludeComments)
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
dereferenceSameDocumentURI
Dereferences a same-document URI fragment.- Parameters:
node
- the node (document or element) referenced by the URI fragment. If null, returns an empty set.- Returns:
- a set of nodes (minus any comment nodes)
-
nodeSetMinusCommentNodes
Recursively traverses the subtree, and returns an XPath-equivalent node-set of all nodes traversed, excluding any comment nodes, if specified.- Parameters:
node
- the node to traversenodeSet
- the set of nodes traversed so farprevSibling
- the previous sibling node
-