Package org.htmlunit.html
Class DomNode.DescendantElementsIterator<T extends DomNode>
- java.lang.Object
-
- org.htmlunit.html.DomNode.DescendantElementsIterator<T>
-
- Type Parameters:
T- the type of nodes over which to iterate
- All Implemented Interfaces:
java.util.Iterator<T>
- Enclosing class:
- DomNode
protected class DomNode.DescendantElementsIterator<T extends DomNode> extends java.lang.Object implements java.util.Iterator<T>Iterates over all descendants of a specific type, in document order.
-
-
Constructor Summary
Constructors Constructor Description DescendantElementsIterator(java.lang.Class<T> type)Creates a new instance which iterates over the specified node type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()protected booleanisAccepted(DomNode node)Indicates if the node is accepted.Tnext()TnextNode()voidremove()
-
-
-
Constructor Detail
-
DescendantElementsIterator
public DescendantElementsIterator(java.lang.Class<T> type)
Creates a new instance which iterates over the specified node type.- Parameters:
type- the type of nodes over which to iterate
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
nextNode
public T nextNode()
- Returns:
- the next node, if there is one
-
isAccepted
protected boolean isAccepted(DomNode node)
Indicates if the node is accepted. If not it won't be explored at all.- Parameters:
node- the node to test- Returns:
trueif accepted
-
-