# Iterators (Apache Commons Compress 1.13 API)

org.apache.commons.compress.utils

## Class Iterators

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

-     public class Iterators
      extends Object

  Iterator utilities.
  Since:
    1.13.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> boolean` | `addAll(Collection<T> collection, Iterator<? extends T> iterator)` Adds all the elements in the source `iterator` to the target `collection`.

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

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

- - ### Method Detail

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

      Returns:
        `true` if the target `collection` was modified as a result of this operation

Copyright © 2016 The Apache Software Foundation. All rights reserved.