Module org.htmlunit
Package org.htmlunit.html
Class DomNode.AbstractDescendantIterator<T extends DomNode>
java.lang.Object
org.htmlunit.html.DomNode.AbstractDescendantIterator<T>
- Type Parameters:
T- the element type
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
DomNode.DescendantDomElementsIterator,DomNode.DescendantHtmlElementsIterator
- Enclosing class:
- DomNode
protected abstract class DomNode.AbstractDescendantIterator<T extends DomNode>
extends Object
implements Iterator<T>
Iterates over all descendants DomElements, in document order.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance which iterates over the specified node type. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
AbstractDescendantIterator
protected AbstractDescendantIterator()Creates a new instance which iterates over the specified node type.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
nextNode
Returns the next node in the iteration.- Returns:
- the next node, or
nullif there are no more nodes
-
isAccepted
Indicates if the node is accepted. If not it won't be explored at all.- Parameters:
node- the node to test- Returns:
trueif accepted
-