Package uk.ac.ebi.utils.collections
Class IteratorUtils
java.lang.Object
uk.ac.ebi.utils.collections.IteratorUtils
- Author:
- Marco Brandizi
- Date:
- 7 Oct 2024
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> Iterator<E> supplier2Iterator(Supplier<? extends E> supplier) Builds anIteratorof non-null based on a supplier.
-
Method Details
-
supplier2Iterator
Builds anIteratorof non-null based on a supplier.- Parameters:
supplier- provides an element every time the resulting interator requests for it. The first time this offers a null, the iterator starts returning false inIterator.hasNext()and the iteration is over.
-