in src/main/java/com/spotify/futures/FuturesExtra.java [579:593]
public static <Z, A, B, C, D> ListenableFuture<Z> syncTransform4(
ListenableFuture<A> a,
ListenableFuture<B> b,
ListenableFuture<C> c,
ListenableFuture<D> d,
final Function4<Z, ? super A, ? super B, ? super C, ? super D> function,
final Executor executor) {
return transform(
Arrays.asList(a, b, c, d),
(Function<List<Object>, Z>)
results ->
function.apply(
(A) results.get(0), (B) results.get(1), (C) results.get(2), (D) results.get(3)),
executor);
}