Class Iterators
- java.lang.Object
-
- org.apache.commons.compress.utils.Iterators
-
public class Iterators extends java.lang.ObjectIterator utilities.- Since:
- 1.13.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> booleanaddAll(java.util.Collection<T> collection, java.util.Iterator<? extends T> iterator)Adds all the elements in the sourceiteratorto the targetcollection.
-
-
-
Method Detail
-
addAll
public static <T> boolean addAll(java.util.Collection<T> collection, java.util.Iterator<? extends T> iterator)Adds all the elements in the sourceiteratorto the targetcollection.When this method returns, the
iteratorwill be "empty": itshasNext()method returnsfalse.- Type Parameters:
T- type of the elements contained inside the collection- Parameters:
collection- target collectioniterator- source- Returns:
trueif the targetcollectionwas modified as a result of this operation
-
-