23 |
|
* <li>The computation performed by a stage may be expressed as a |
24 |
|
* Function, Consumer, or Runnable (using methods with names including |
25 |
|
* <em>apply</em>, <em>accept</em>, or <em>run</em>, respectively) |
26 |
< |
* depending on whether it requires arguments and/or produce results. |
26 |
> |
* depending on whether it requires arguments and/or produces results. |
27 |
|
* For example, {@code stage.thenApply(x -> square(x)).thenAccept(x -> |
28 |
|
* System.out.print(x)).thenRun(() -> System.out.println())}. An |
29 |
|
* additional form (<em>compose</em>) applies functions of stages |
30 |
< |
* themselves, rather than their results. <li> |
30 |
> |
* themselves, rather than their results. </li> |
31 |
|
* |
32 |
|
* <li> One stage's execution may be triggered by completion of a |
33 |
|
* single stage, or both of two stages, or either of two stages. |
45 |
|
* be arranged in any of three ways: default execution, default |
46 |
|
* asynchronous execution (using methods with suffix <em>async</em> |
47 |
|
* that employ the stage's default asynchronous execution facility), |
48 |
< |
* or custom (via supplied a {@link Executor}). The execution |
48 |
> |
* or custom (via a supplied {@link Executor}). The execution |
49 |
|
* properties of default and async modes are specified by |
50 |
|
* CompletionStage implementations, not this interface. Methods with |
51 |
|
* explicit Executor arguments may have arbitrary execution |
69 |
|
* <em>either</em> of two others, and only one of them completes |
70 |
|
* exceptionally, no guarantees are made about whether the dependent |
71 |
|
* stage completes normally or exceptionally. In the case of method |
72 |
< |
* {@code whenComplete}, if the supplied action itself encounters an |
72 |
> |
* {@code whenComplete}, when the supplied action itself encounters an |
73 |
|
* exception, then the stage exceptionally completes with this |
74 |
|
* exception if not already completed exceptionally.</li> |
75 |
|
* |