code: public static <T> Future<T> anyOf(Future<T>... fts) {
        CompletableFuture<T>[] array = new CompletableFuture[fts.length];
        for(int i=0;i<fts.length;i++){
          array[i] = fts[i].getFuture();
        }
  
         return (Future<T>) Future.of(CompletableFuture.anyOf(array));
      }
docs: Select the first Future to complete
  
  @see CompletableFuture#anyOf(CompletableFuture...)
  @param fts Futures to race
  @return First Future to complete