public static < T > boolean addAll ( Collection < T > target , Iterator < ? extends T > iterator ) { Preconditions . checkArgumentNotNull ( target , "target" ) ; boolean modified = false ; while ( iterator . hasNext ( ) ) { modified |= target . add ( iterator . next ( ) ) ; } return modified ; }
Add all elements in the iterator to the collection .