public static ListenableFuture asyncTransform2()

in src/main/java/com/spotify/futures/FuturesExtra.java [417:427]


  public static <Z, A, B> ListenableFuture<Z> asyncTransform2(
      ListenableFuture<A> a,
      ListenableFuture<B> b,
      final AsyncFunction2<Z, ? super A, ? super B> function,
      final Executor executor) {
    return transform(
        Arrays.asList(a, b),
        (AsyncFunction<List<Object>, Z>)
            results -> function.apply((A) results.get(0), (B) results.get(1)),
        executor);
  }