Top Description Constructors Methods
org.apache.commons.compress.utils

public Class Iterators

extends Object
Class Inheritance
Imports
java.util.Collection, .Iterator, .Objects

Iterator utilities.
Since
1.13.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
type of the elements contained inside the collection
T
>
boolean

Returns:

true if the target collection was modified as a result of this operation
addAll
(final Collection<T>
target collection
collection
,
final Iterator<? extends T>
source
iterator
)

Adds all the elements in the source iterator to the target collection.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Iteratorsback to summary
private Iterators()

Method Detail

addAllback to summary
public static <T> boolean addAll(final Collection<T> collection, final 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.

Parameters
<T>
type of the elements contained inside the collection
collection:Collection<T>

target collection

iterator:Iterator<? extends T>

source

Returns:boolean

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