Class CloseableIteratorUtils

java.lang.Object
fr.gouv.vitam.common.collection.CloseableIteratorUtils

public final class CloseableIteratorUtils extends Object
Helper class for CloseableIterators
  • 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

      public static <E> CloseableIterator<E> toCloseableIterator(Iterator<E> iterator)
      Converts an Iterator to a CloseableIterator. The close methods does nothing.
    • toCloseableIterator

      public static <E> CloseableIterator<E> toCloseableIterator(Iterable<E> iterable)
      Converts an Iterable to a CloseableIterator. The close methods does nothing.