Class 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).
    • Constructor Summary

      Constructors 
      Constructor Description
      RowIterator()
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      java.util.Iterator<HtmlTableRow> iterator()  
      HtmlTableRow next()  
      HtmlTableRow nextRow()  
      void remove()
      Removes the current row from the underlying table.
      private void setNextRow​(DomNode node)
      Sets the internal position to the next row, starting at the given node.
      • 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
    • Constructor Detail

      • RowIterator

        RowIterator()
        Creates a new instance.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<HtmlTableRow>
        Returns:
        true if there are more rows available
      • next

        public HtmlTableRow next()
                          throws java.util.NoSuchElementException
        Specified by:
        next in interface java.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:
        remove in interface java.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:
        iterator in interface java.lang.Iterable<HtmlTableRow>