2074 |
|
* |
2075 |
|
* @param supplier a function returning the value to be used |
2076 |
|
* to complete the returned CompletableFuture |
2077 |
< |
* @param <U> the type of the returned future's value |
2077 |
> |
* @param <U> the function's return type |
2078 |
|
* @return the new CompletableFuture |
2079 |
|
*/ |
2080 |
|
public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier) { |
2093 |
|
* @param supplier a function returning the value to be used |
2094 |
|
* to complete the returned CompletableFuture |
2095 |
|
* @param executor the executor to use for asynchronous execution |
2096 |
< |
* @param <U> the type of the returned future's value |
2096 |
> |
* @param <U> the function's return type |
2097 |
|
* @return the new CompletableFuture |
2098 |
|
*/ |
2099 |
|
public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier, |
2146 |
|
* the given value. |
2147 |
|
* |
2148 |
|
* @param value the value |
2149 |
< |
* @param <U> the type of the returned future's value |
2149 |
> |
* @param <U> the type of the value |
2150 |
|
* @return the completed CompletableFuture |
2151 |
|
*/ |
2152 |
|
public static <U> CompletableFuture<U> completedFuture(U value) { |