Class Iterators
java.lang.Object
org.apache.commons.compress.utils.Iterators
Iterator utilities.
- Since:
- 1.13.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> boolean
addAll
(Collection<T> collection, Iterator<? extends T> iterator) Adds all the elements in the sourceiterator
to the targetcollection
.
-
Method Details
-
addAll
Adds all the elements in the sourceiterator
to the targetcollection
.When this method returns, the
iterator
will be "empty": itshasNext()
method returnsfalse
.- Type Parameters:
T
- type of the elements contained inside the collection- Parameters:
collection
- target collectioniterator
- source- Returns:
true
if the targetcollection
was modified as a result of this operation
-