Package com.artipie.conan
Class Completables.JoinList<T>
java.lang.Object
com.artipie.conan.Completables.JoinList<T>
- Type Parameters:
T
- Type of the results.
- Enclosing class:
Completables
Converts List of CompletableFutures with results to CompletableFuture which provides
list or array with results.
- Since:
- 0.1
-
Constructor Summary
ConstructorsConstructorDescriptionJoinList
(List<CompletableFuture<T>> futures) Initializes instance with the List of CompletableFutures. -
Method Summary
Modifier and TypeMethodDescriptiontoArray
(IntFunction<T[]> generator) Converts to the array of results inside CompletableFuture.toList()
Converts to the List of results inside CompletableFuture.
-
Constructor Details
-
JoinList
Initializes instance with the List of CompletableFutures.- Parameters:
futures
- List of CompletableFutures to process.
-
-
Method Details
-
toList
Converts to the List of results inside CompletableFuture.- Returns:
- List of results inside CompletableFuture.
-
toArray
Converts to the array of results inside CompletableFuture.- Parameters:
generator
- Array instance generator.- Returns:
- Array of results inside CompletableFuture.
-