41 |
|
* } |
42 |
|
* </pre> |
43 |
|
* |
44 |
< |
* The {@link FutureTask} class is an implementation of <tt>Future</tt> that |
45 |
< |
* implements <tt>Runnable</tt>, and so may be executed by an <tt>Executor</tt>. |
44 |
> |
* The {@link FutureTask} class is an implementation of <tt>Future</tt> that |
45 |
> |
* implements <tt>Runnable</tt>, and so may be executed by an <tt>Executor</tt>. |
46 |
|
* For example, the above construction with <tt>submit</tt> could be replaced by: |
47 |
|
* <pre> |
48 |
|
* FutureTask<String> future = |
88 |
|
boolean isCancelled(); |
89 |
|
|
90 |
|
/** |
91 |
< |
* Returns <tt>true</tt> if this task completed. |
91 |
> |
* Returns <tt>true</tt> if this task completed. |
92 |
|
* |
93 |
|
* Completion may be due to normal termination, an exception, or |
94 |
|
* cancellation -- in all of these cases, this method will return |
95 |
|
* <tt>true</tt>. |
96 |
< |
* |
96 |
> |
* |
97 |
|
* @return <tt>true</tt> if this task completed. |
98 |
|
*/ |
99 |
|
boolean isDone(); |
128 |
|
V get(long timeout, TimeUnit unit) |
129 |
|
throws InterruptedException, ExecutionException, TimeoutException; |
130 |
|
} |
131 |
– |
|
132 |
– |
|
133 |
– |
|