Package com.orchestranetworks.service
Interface ValidationReportItemIterator
- All Superinterfaces:
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.
-
Method Details
-
hasNext
boolean hasNext()Returnstrue
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 interfaceAutoCloseable
- Since:
- 6.0.0
- See Also:
-