How to execute an Array of CompletableFuture and compose their results
问题 I am investigating Java 8 CompletableFutures and read (and seen) that I should employ thenCompose instead of thenApply . I have converted my code to use thenCompose but I have a feeling in an incorrect manner. Here is my controlling code... final CompletableFuture<List<String>> extractor = get(htmlPageSource); @SuppressWarnings("unchecked") final CompletableFuture<List<Documentable>>[] completableFutures = new CompletableFuture[ENDPOINT.EXTRACTABLES.size()]; int index = 0; for( ENDPOINT