CompletionStage.toCompletableFuture

Returns a {@link CompletableFuture} maintaining the same completion properties as this stage. If this stage is already a CompletableFuture, this method may return this stage itself. Otherwise, invocation of this method may be equivalent in effect to {@code thenApply(x -> x)}, but returning an instance of type {@code CompletableFuture}.

@return the CompletableFuture

interface CompletionStage(T)
toCompletableFuture
()

Meta