thenApply

The CompletableFuture method that transforms a stage's result once it is available, producing a new stage.

In more detail

It is the asynchronous equivalent of map. If the earlier stage failed, the transformation is skipped and the failure passes on.

Example

.thenApply(String::toUpperCase)

Related terms

Taught in

References