25 |
|
* <b>Sample Usage</b> (Note that the following classes are all |
26 |
|
* made-up.) |
27 |
|
* |
28 |
< |
* <pre> {@code |
28 |
> |
* <pre> {@code |
29 |
|
* interface ArchiveSearcher { String search(String target); } |
30 |
|
* class App { |
31 |
|
* ExecutorService executor = ... |
47 |
|
* The {@link FutureTask} class is an implementation of {@code Future} that |
48 |
|
* implements {@code Runnable}, and so may be executed by an {@code Executor}. |
49 |
|
* For example, the above construction with {@code submit} could be replaced by: |
50 |
< |
* <pre> {@code |
50 |
> |
* <pre> {@code |
51 |
|
* FutureTask<String> future = |
52 |
|
* new FutureTask<>(new Callable<String>() { |
53 |
|
* public String call() { |