Package fr.gouv.vitam.common.collection

# Class CloseableIteratorUtils

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

public final class CloseableIteratorUtils extends Object
Helper class for CloseableIterators

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.
  `static <E> CloseableIterable<E>`
  `toCloseableIterable(CloseableIterator<E> closeableIterator)`
  `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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.

  - ### toCloseableIterable

    public static <E> CloseableIterable<E> toCloseableIterable(CloseableIterator<E> closeableIterator)