public interface ValidationReportItemIterator extends AutoCloseable
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.
Modifier and Type | Method and 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.
|
boolean hasNext()
true
if more validation report items are available.true
if the iteration has more itemsValidationReportItem nextItem()
void close()
It is mandatory to call this method after creating an instance of
a ValidationReportItemIterator
.
close
in interface AutoCloseable
AutoCloseable.close()