Returns a new CompletionStage that, when this stage completes
normally, is executed with this stage's result as the argument
to the supplied function.
<p>This method is analogous to
{@link java.util.Optional#map Optional.map} and
{@link java.util.stream.Stream#map Stream.map}.
<p>See the {@link CompletionStage} documentation for rules
covering exceptional completion.
@param fn the function to use to compute the value of the
returned CompletionStage
@param (U) the function's return type
@return the new CompletionStage
Returns a new CompletionStage that, when this stage completes normally, is executed with this stage's result as the argument to the supplied function.
<p>This method is analogous to {@link java.util.Optional#map Optional.map} and {@link java.util.stream.Stream#map Stream.map}.
<p>See the {@link CompletionStage} documentation for rules covering exceptional completion.
@param fn the function to use to compute the value of the returned CompletionStage @param (U) the function's return type @return the new CompletionStage