code: public static <T> CompletableFuture<Void> allOf(Collection<CompletableFuture<T>> futures) {
          return CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()]));
      }
docs: Similar implementation to CompletableFuture.allOf(vararg) but that works on a Collection.
  
  @param futures A Collection of CompletableFutures to wait on.
  @param <T>     The type of the results items.
  @return A new CompletableFuture that is completed when all of the given CompletableFutures complete.