Package fr.gouv.vitam.common.collection
Class CloseableIteratorUtils
java.lang.Object
fr.gouv.vitam.common.collection.CloseableIteratorUtils
Helper class for CloseableIterators
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
R> CloseableIterator<R> map
(CloseableIterator<T> closeableIterator, Function<? super T, ? extends R> mapper) Maps a CloseableIterator from un input type T to an output type R using a mapper function.static <E> CloseableIterator<E>
toCloseableIterator
(Iterable<E> iterable) Converts an Iterable to a CloseableIterator.static <E> CloseableIterator<E>
toCloseableIterator
(Iterator<E> iterator) Converts an Iterator to a CloseableIterator.
-
Method Details
-
map
public static <T,R> CloseableIterator<R> map(CloseableIterator<T> closeableIterator, Function<? super T, ? extends R> mapper) Maps a CloseableIterator from un input type T to an output type R using a mapper function. -
toCloseableIterator
Converts an Iterator to a CloseableIterator. The close methods does nothing. -
toCloseableIterator
Converts an Iterable to a CloseableIterator. The close methods does nothing.
-