159 |
|
* when all complete. |
160 |
|
* Note that a <em>completed</em> task could have |
161 |
|
* terminated either normally or by throwing an exception. |
162 |
+ |
* The results of this method are undefined if the given |
163 |
+ |
* collection is modified while this operation is in progress. |
164 |
|
* @param tasks the collection of tasks |
165 |
|
* @return A list of Futures representing the tasks, in the same |
166 |
< |
* sequential order as produced by the iterator for the given task list, each of which has |
167 |
< |
* completed. |
166 |
> |
* sequential order as produced by the iterator for the given task |
167 |
> |
* list, each of which has completed. |
168 |
|
* @throws InterruptedException if interrupted while waiting, in |
169 |
|
* which case unfinished tasks are cancelled. |
170 |
|
* @throws NullPointerException if tasks or any of its elements are <tt>null</tt> |
181 |
|
* Upon return, tasks that have not completed are cancelled. |
182 |
|
* Note that a <em>completed</em> task could have |
183 |
|
* terminated either normally or by throwing an exception. |
184 |
+ |
* The results of this method are undefined if the given |
185 |
+ |
* collection is modified while this operation is in progress. |
186 |
|
* @param tasks the collection of tasks |
187 |
|
* @param timeout the maximum time to wait |
188 |
|
* @param unit the time unit of the timeout argument |
189 |
|
* @return A list of Futures representing the tasks, in the same |
190 |
< |
* sequential order as as produced by the iterator for the given task list. If the operation did |
191 |
< |
* not time out, each task will have completed. If it did time |
192 |
< |
* out, some of thiese tasks will not have completed. |
190 |
> |
* sequential order as as produced by the iterator for the given |
191 |
> |
* task list. If the operation did not time out, each task will |
192 |
> |
* have completed. If it did time out, some of thiese tasks will |
193 |
> |
* not have completed. |
194 |
|
* @throws InterruptedException if interrupted while waiting, in |
195 |
|
* which case unfinished tasks are cancelled. |
196 |
|
* @throws NullPointerException if tasks, any of its elements, or |
207 |
|
* of one that has completed successfully (i.e., without throwing |
208 |
|
* an exception), if any do. Upon normal or exceptional return, |
209 |
|
* tasks that have not completed are cancelled. |
210 |
+ |
* The results of this method are undefined if the given |
211 |
+ |
* collection is modified while this operation is in progress. |
212 |
|
* @param tasks the collection of tasks |
213 |
|
* @return The result returned by one of the tasks. |
214 |
|
* @throws InterruptedException if interrupted while waiting |
228 |
|
* an exception), if any do before the given timeout elapses. |
229 |
|
* Upon normal or exceptional return, tasks that have not |
230 |
|
* completed are cancelled. |
231 |
+ |
* The results of this method are undefined if the given |
232 |
+ |
* collection is modified while this operation is in progress. |
233 |
|
* @param tasks the collection of tasks |
234 |
|
* @param timeout the maximum time to wait |
235 |
|
* @param unit the time unit of the timeout argument |