Class Iterators

java.lang.Object
org.apache.commons.compress.utils.Iterators

public class Iterators extends Object
Iterator utilities.
Since:
1.13.
  • Method Details

    • addAll

      public static <T> boolean addAll(Collection<T> collection, Iterator<? extends T> iterator)
      Adds all the elements in the source iterator to the target collection.

      When this method returns, the iterator will be "empty": its hasNext() method returns false.

      Type Parameters:
      T - type of the elements contained inside the collection
      Parameters:
      collection - target collection
      iterator - source
      Returns:
      true if the target collection was modified as a result of this operation