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 Detail

      • 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