| Modifier and Type | Method and Description | 
|---|---|
| static Promise<Void> | allOf(Collection<? extends Promise<?>> promises)Returns a new promise that  completeswhen all promises from the given collection
 complete normally or exceptionally. | 
| static Promise<Void> | allOf(Promise<?>... promises)Returns a new promise that  completeswhen all promises from the given array
 complete normally or exceptionally. | 
| static <T> Promise<T> | anyOf(Collection<? extends Promise<T>> promises)Returns a new promise that  completeswhen any promise from the given collection
 complete normally or exceptionally. | 
| static <T> Promise<T> | anyOf(Promise<T>... promises)Returns a new promise that  completeswhen any promise from the given array
 complete normally or exceptionally. | 
public static Promise<Void> allOf(Collection<? extends Promise<?>> promises)
completes when all promises from the given collection
 complete normally or exceptionally.
 The results of the given promises are not reflected in the returned promise, but may be
 obtained by inspecting them individually. If no promises are provided, returns a promise completed
 with the value null.
 When the resulting promise completes for any reason (is canceled, for example)
 then all of the promises from the given collection are canceled.promises - a collection of promises.completes when all promises from the given collection complete.NullPointerException - if promises is null or any individual promise there is null.public static Promise<Void> allOf(Promise<?>... promises)
completes when all promises from the given array
 complete normally or exceptionally.
 The results of the given promises are not reflected in the returned promise, but may be
 obtained by inspecting them individually. If no promises are provided, returns a promise completed
 with the value null.
 When the resulting promise completes for any reason (is canceled, for example)
 then all of the promises from the given array are canceled.promises - an array of promises.completes when all promises from the given array complete.NullPointerException - if promises is null or any individual promise there is null.public static <T> Promise<T> anyOf(Collection<? extends Promise<T>> promises)
completes when any promise from the given collection
 complete normally or exceptionally.
 If any of the given promises complete exceptionally, then the returned promise
 also does so with the same exception and all non-completed promises in the
 list are canceled.
 If any of the given promises complete with result, then the returned promise
 also does so with the same result and all non-completed promises in the
 list are canceled.
 When the resulting promise completes for any reason (is canceled, for example)
 then all of the promises from the given collection are canceled.promises - a collection of promises.completes when any promise from the given collection completes.NullPointerException - if promises is null or any individual promise there is null.public static <T> Promise<T> anyOf(Promise<T>... promises)
completes when any promise from the given array
 complete normally or exceptionally.
 If any of the given promises complete exceptionally, then the returned promise
 also does so with the same exception and all non-completed promises in the
 list are canceled.
 If any of the given promises complete with result, then the returned promise
 also does so with the same result and all non-completed promises in the
 list are canceled.
 When the resulting promise completes for any reason (is canceled, for example)
 then all of the promises from the given array are canceled.promises - a collection of promises.completes when any promise from the given array completes.NullPointerException - if promises is null or any individual promise there is null.Copyright © 2002–2023 Devexperts LLC. All rights reserved.