105 |
|
* {@link #isCompletedNormally} is true if a task completed without |
106 |
|
* cancellation or encountering an exception; {@link #isCancelled} is |
107 |
|
* true if the task was cancelled (in which case {@link #getException} |
108 |
< |
* returns a {@link java.util.concurrent.CancellationException}); and |
108 |
> |
* returns a {@link CancellationException}); and |
109 |
|
* {@link #isCompletedAbnormally} is true if a task was either |
110 |
|
* cancelled or encountered an exception, in which case {@link |
111 |
|
* #getException} will return either the encountered exception or |
112 |
< |
* {@link java.util.concurrent.CancellationException}. |
112 |
> |
* {@link CancellationException}. |
113 |
|
* |
114 |
|
* <p>The ForkJoinTask class is not usually directly subclassed. |
115 |
|
* Instead, you subclass one of the abstract classes that support a |
666 |
|
} |
667 |
|
|
668 |
|
/** |
669 |
< |
* Returns the result of the computation when it {@link #isDone is |
670 |
< |
* done}. This method differs from {@link #get()} in that |
671 |
< |
* abnormal completion results in {@code RuntimeException} or |
672 |
< |
* {@code Error}, not {@code ExecutionException}, and that |
673 |
< |
* interrupts of the calling thread do <em>not</em> cause the |
674 |
< |
* method to abruptly return by throwing {@code |
675 |
< |
* InterruptedException}. |
669 |
> |
* Returns the result of the computation when it |
670 |
> |
* {@linkplain #isDone is done}. |
671 |
> |
* This method differs from {@link #get()} in that abnormal |
672 |
> |
* completion results in {@code RuntimeException} or {@code Error}, |
673 |
> |
* not {@code ExecutionException}, and that interrupts of the |
674 |
> |
* calling thread do <em>not</em> cause the method to abruptly |
675 |
> |
* return by throwing {@code InterruptedException}. |
676 |
|
* |
677 |
|
* @return the computed result |
678 |
|
*/ |