/** * Combine the given promises into a single promise for the list of results. * * <p>The sequencing operations are performed in the default ExecutionContext. * * @param promises The promises to combine * @return A single promise whose methods act on the list of redeemed promises */ public static <A> Promise<List<A>> sequence(Promise<? extends A>... promises) { return FPromiseHelper.<A>sequence( java.util.Arrays.asList(promises), HttpExecution.defaultContext()); }
/** * Combine the given promises into a single promise for the list of results. * * <p>The sequencing operations are performed in the default ExecutionContext. * * @param promises The promises to combine * @return A single promise whose methods act on the list of redeemed promises */ public static <A> Promise<List<A>> sequence(Iterable<Promise<? extends A>> promises) { return FPromiseHelper.<A>sequence(promises, HttpExecution.defaultContext()); }
/** * Combine the given promises into a single promise for the list of results. * * @param promises The promises to combine * @param ec Used to execute the sequencing operations. * @return A single promise whose methods act on the list of redeemed promises */ public static <A> Promise<List<A>> sequence( Iterable<Promise<? extends A>> promises, ExecutionContext ec) { return FPromiseHelper.<A>sequence(promises, ec); }
/** * Combine the given promises into a single promise for the list of results. * * @param ec Used to execute the sequencing operations. * @param promises The promises to combine * @return A single promise whose methods act on the list of redeemed promises */ public static <A> Promise<List<A>> sequence( ExecutionContext ec, Promise<? extends A>... promises) { return FPromiseHelper.<A>sequence(java.util.Arrays.asList(promises), ec); }