public abstract <U> CompletionStage<U> applyToEitherAsync (CompletionStage<? extends T> other, Function<? super T, U> fn, Executor executor)

Returns a new CompletionStage that, when either this or the other given stage complete normally, is executed using the supplied executor, with the corresponding result as argument to the supplied function. See the CompletionStage documentation for rules covering exceptional completion.

Parameters:
other    the other CompletionStage
fn    the function to use to compute the value of the returned CompletionStage
executor    the executor to use for asynchronous execution
<U>    the function's return type

Returns:  the new CompletionStage