Package org.htmlunit.html
Class HtmlTable.RowIterator
- java.lang.Object
-
- org.htmlunit.html.HtmlTable.RowIterator
-
- All Implemented Interfaces:
java.lang.Iterable<HtmlTableRow>,java.util.Iterator<HtmlTableRow>
- Enclosing class:
- HtmlTable
private class HtmlTable.RowIterator extends java.lang.Object implements java.util.Iterator<HtmlTableRow>, java.lang.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 Modifier and Type Field Description private TableRowGroupcurrentGroup_private HtmlTableRownextRow_
-
Constructor Summary
Constructors Constructor Description RowIterator()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()java.util.Iterator<HtmlTableRow>iterator()HtmlTableRownext()HtmlTableRownextRow()voidremove()Removes the current row from the underlying table.private voidsetNextRow(DomNode node)Sets the internal position to the next row, starting at the given node.
-
-
-
Field Detail
-
nextRow_
private HtmlTableRow nextRow_
-
currentGroup_
private TableRowGroup currentGroup_
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<HtmlTableRow>- Returns:
trueif there are more rows available
-
next
public HtmlTableRow next() throws java.util.NoSuchElementException
- Specified by:
nextin interfacejava.util.Iterator<HtmlTableRow>- Returns:
- the next row from this iterator
- Throws:
java.util.NoSuchElementException- if no more rows are available
-
remove
public void remove()
Removes the current row from the underlying table.- Specified by:
removein interfacejava.util.Iterator<HtmlTableRow>
-
nextRow
public HtmlTableRow nextRow() throws java.util.NoSuchElementException
- Returns:
- the next row from this iterator
- Throws:
java.util.NoSuchElementException- if no more rows are available
-
setNextRow
private void setNextRow(DomNode node)
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
public java.util.Iterator<HtmlTableRow> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<HtmlTableRow>
-
-