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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this iterator, relinquishing any underlying resources.booleanhasNext()Returnstrueif more validation report items are available.ValidationReportItemnextItem()Returns the next validation report item.
-
-
-
Method Detail
-
hasNext
boolean hasNext()
Returnstrueif more validation report items are available.- Returns:
trueif 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:
closein interfaceAutoCloseable- Since:
- 6.0.0
- See Also:
AutoCloseable.close()
-
-