121 |
|
* @param c collection whose elements are to be added to this collection. |
122 |
|
* @return <tt>true</tt> if this collection changed as a result of the |
123 |
|
* call. |
124 |
< |
* @throws NullPointerException if the specified collection, or |
124 |
> |
* @throws NullPointerException if the specified collection or |
125 |
|
* any of its elements are null. |
126 |
|
* @throws IllegalArgumentException if c is this queue. |
127 |
|
* |
132 |
|
throw new NullPointerException(); |
133 |
|
if (c == this) |
134 |
|
throw new IllegalArgumentException(); |
135 |
< |
boolean modified = false; |
136 |
< |
Iterator<? extends E> e = c.iterator(); |
137 |
< |
while (e.hasNext()) { |
138 |
< |
if (add(e.next())) |
139 |
< |
modified = true; |
140 |
< |
} |
141 |
< |
return modified; |
135 |
> |
boolean modified = false; |
136 |
> |
Iterator<? extends E> e = c.iterator(); |
137 |
> |
while (e.hasNext()) { |
138 |
> |
if (add(e.next())) |
139 |
> |
modified = true; |
140 |
> |
} |
141 |
> |
return modified; |
142 |
|
} |
143 |
|
|
144 |
|
} |