Package org.htmlunit.html
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
nextRow_
-
currentGroup_
-
-
Constructor Details
-
RowIterator
RowIterator()Creates a new instance.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<HtmlTableRow>
- Returns:
true
if there are more rows available
-
next
- Specified by:
next
in 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:
remove
in 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:
iterator
in interfaceIterable<HtmlTableRow>
-