Package org.htmlunit.html

# Class HtmlTableRow.CellIterator

java.lang.Object
org.htmlunit.html.HtmlTableRow.CellIterator

All Implemented Interfaces:
  `Iterable<HtmlTableCell>`, `Iterator<HtmlTableCell>`

Enclosing class:
  `HtmlTableRow`

public class HtmlTableRow.CellIterator extends Object implements Iterator<HtmlTableCell>, Iterable<HtmlTableCell>
An Iterator over the HtmlTableCells contained in this row. It will also dive into nested forms, even though that is illegal HTML.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CellIterator()`
  Creates an instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `hasNext()`
  `Iterator<HtmlTableCell>`
  `iterator()`
  Returns an HtmlTableCell iterator.
  `HtmlTableCell`
  `next()`
  `HtmlTableCell`
  `nextCell()`
  `void`
  `remove()`
  Removes the cell under the cursor from the current row.

  ### 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 Details

  - ### CellIterator

    public CellIterator()
    Creates an instance.

- ## Method Details

  - ### hasNext

    public boolean hasNext()
    Specified by:
      `hasNext` in interface `Iterator<HtmlTableCell>`
    Returns:
      whether there is another cell available

  - ### next

    public HtmlTableCell next() throws NoSuchElementException
    Specified by:
      `next` in interface `Iterator<HtmlTableCell>`
    Returns:
      the next cell
    Throws:
      `NoSuchElementException` - if no cell is available

  - ### remove

    public void remove()
    Removes the cell under the cursor from the current row.
    Specified by:
      `remove` in interface `Iterator<HtmlTableCell>`

  - ### nextCell

    public HtmlTableCell nextCell() throws NoSuchElementException
    Returns:
      the next cell
    Throws:
      `NoSuchElementException` - if no cell is available

  - ### iterator

    public Iterator<HtmlTableCell> iterator()
    Returns an HtmlTableCell iterator.
    Specified by:
      `iterator` in interface `Iterable<HtmlTableCell>`
    Returns:
      an HtmlTableCell Iterator.