Package com.orchestranetworks.service

# Interface ValidationReportItemIterator

All Superinterfaces:
  `AutoCloseable`

public interface ValidationReportItemIterator extends AutoCloseable
Iterator over items contained in a validation report.

The iterator must always be closed after use to release its resources. It is recommended to obtain the iterator in a try-with-resources statement, as it is shown in the code snippet below.

     try (ValidationReportItemIterator iterator =
                    validationReport.getItemsOfSeverity(Severity.ERROR))
     {
            while (iterator.hasNext())
            {
                    // ...
            }
     }

The iterator can be accessed only as long as the underlying validation dataspace is open.

See Also:
  - `ValidationReport.getItemsOfSeverity(Severity)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes this iterator, relinquishing any underlying resources.
  `boolean`
  `hasNext()`
  Returns `true` if more validation report items are available.
  `ValidationReportItem`
  `nextItem()`
  Returns the next validation report item.

- ## Method Details

  - ### hasNext

    boolean hasNext()
    Returns `true` if more validation report items are available.
    Returns:
      `true` if the iteration has more items

  - ### nextItem

    ValidationReportItem nextItem()
    Returns the next validation report item.
    Returns:
      the next item in the iteration

  - ### close

    void close()
    Closes this iterator, relinquishing any underlying resources.

    It is mandatory to call this method after creating an instance of a `ValidationReportItemIterator`.

    Specified by:
      `close` in interface `AutoCloseable`
    Since:
      6.0.0
    See Also:
      - `AutoCloseable.close()`