97 |
|
* given {@code Callable}. |
98 |
|
* |
99 |
|
* @param callable the callable task |
100 |
< |
* @throws NullPointerException if callable is null |
100 |
> |
* @throws NullPointerException if the callable is null |
101 |
|
*/ |
102 |
|
public FutureTask(Callable<V> callable) { |
103 |
|
if (callable == null) |
116 |
|
* you don't need a particular result, consider using |
117 |
|
* constructions of the form: |
118 |
|
* {@code Future<?> f = new FutureTask<Void>(runnable, null)} |
119 |
< |
* @throws NullPointerException if runnable is null |
119 |
> |
* @throws NullPointerException if the runnable is null |
120 |
|
*/ |
121 |
|
public FutureTask(Runnable runnable, V result) { |
122 |
|
this.callable = Executors.callable(runnable, result); |