public static < T > boolean addAll ( Collection < T > self , Iterator < T > items ) { boolean changed = false ; while ( items . hasNext ( ) ) { T next = items . next ( ) ; if ( self . add ( next ) ) changed = true ; } return changed ; }
Adds all items from the iterator to the Collection .