Class HtmlTable.RowIterator
java.lang.Object
org.htmlunit.html.HtmlTable.RowIterator
- All Implemented Interfaces:
Iterable<HtmlTableRow>, Iterator<HtmlTableRow>
- Enclosing class:
HtmlTable
private class HtmlTable.RowIterator
extends Object
implements Iterator<HtmlTableRow>, Iterable<HtmlTableRow>
An iterator that moves over all rows in this table. The iterator will also
enter into nested row group elements (header, footer and body).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
nextRow_
-
currentGroup_
-
-
Constructor Details
-
RowIterator
RowIterator()Creates a new instance.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<HtmlTableRow>- Returns:
trueif there are more rows available
-
next
- Specified by:
nextin interfaceIterator<HtmlTableRow>- Returns:
- the next row from this iterator
- Throws:
NoSuchElementException- if no more rows are available
-
remove
public void remove()Removes the current row from the underlying table.- Specified by:
removein interfaceIterator<HtmlTableRow>
-
nextRow
- Returns:
- the next row from this iterator
- Throws:
NoSuchElementException- if no more rows are available
-
setNextRow
Sets the internal position to the next row, starting at the given node.- Parameters:
node- the node to mark as the next row; if this is not a row, the next reachable row will be marked.
-
iterator
- Specified by:
iteratorin interfaceIterable<HtmlTableRow>
-