/** * Adds all of the elements in <tt>collection</tt> to the set. * * @param collection a <code>Collection</code> value * @return true if the set was modified by the add all operation. */ public boolean addAll(Collection collection) { boolean changed = false; int size = collection.size(); Iterator it; ensureCapacity(size); it = collection.iterator(); while (size-- > 0) { if (add(it.next())) { changed = true; } } return changed; }