Module java.base
Package java.util.concurrent

# Class CompletableFuture

=
public class CompletableFuture<T>
extends java.lang.Object
implements java.util.concurrent.CompletionStage<T>, java.util.concurrent.Future<T>

## Nested Types

- = AsynchronousCompletionTask

## Constructors

- =
  public CompletableFuture()

## Methods

- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEither(java.util.concurrent.CompletionStage<? extends T> arg0, java.util.function.Consumer<? super T> arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T> arg0, java.util.function.Consumer<? super T> arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T> arg0, java.util.function.Consumer<? super T> arg1, java.util.concurrent.Executor arg2)
- =
  public static java.util.concurrent.CompletableFuture<java.lang.Void> allOf(java.util.concurrent.CompletableFuture<?>[] arg0)
- =
  public static java.util.concurrent.CompletableFuture<java.lang.Object> anyOf(java.util.concurrent.CompletableFuture<?>[] arg0)
- =
  public <U> java.util.concurrent.CompletableFuture<U> applyToEither(java.util.concurrent.CompletionStage<? extends T> arg0, java.util.function.Function<? super T, U> arg1)
- =
  public <U> java.util.concurrent.CompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T> arg0, java.util.function.Function<? super T, U> arg1)
- =
  public <U> java.util.concurrent.CompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T> arg0, java.util.function.Function<? super T, U> arg1, java.util.concurrent.Executor arg2)
- =
  public boolean cancel(boolean arg0)
- =
  public boolean complete(T arg0)
- =
  public java.util.concurrent.CompletableFuture<T> completeAsync(java.util.function.Supplier<? extends T> arg0)
- =
  public java.util.concurrent.CompletableFuture<T> completeAsync(java.util.function.Supplier<? extends T> arg0, java.util.concurrent.Executor arg1)
- =
  public boolean completeExceptionally(java.lang.Throwable arg0)
- =
  public java.util.concurrent.CompletableFuture<T> completeOnTimeout(T arg0, long arg1, java.util.concurrent.TimeUnit arg2)
- =
  public static <U> java.util.concurrent.CompletableFuture<U> completedFuture(U arg0)
- =
  public static <U> java.util.concurrent.CompletionStage<U> completedStage(U arg0)
- =
  public java.util.concurrent.CompletableFuture<T> copy()
- =
  public java.util.concurrent.Executor defaultExecutor()
- =
  public static java.util.concurrent.Executor delayedExecutor(long arg0, java.util.concurrent.TimeUnit arg1)
- =
  public static java.util.concurrent.Executor delayedExecutor(long arg0, java.util.concurrent.TimeUnit arg1, java.util.concurrent.Executor arg2)
- =
  public java.lang.Throwable exceptionNow()
- =
  public java.util.concurrent.CompletableFuture<T> exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T> arg0)
- =
  public java.util.concurrent.CompletableFuture<T> exceptionallyAsync(java.util.function.Function<java.lang.Throwable, ? extends T> arg0)
- =
  public java.util.concurrent.CompletableFuture<T> exceptionallyAsync(java.util.function.Function<java.lang.Throwable, ? extends T> arg0, java.util.concurrent.Executor arg1)
- =
  public java.util.concurrent.CompletableFuture<T> exceptionallyCompose(java.util.function.Function<java.lang.Throwable, ? extends java.util.concurrent.CompletionStage<T>> arg0)
- =
  public java.util.concurrent.CompletableFuture<T> exceptionallyComposeAsync(java.util.function.Function<java.lang.Throwable, ? extends java.util.concurrent.CompletionStage<T>> arg0)
- =
  public java.util.concurrent.CompletableFuture<T> exceptionallyComposeAsync(java.util.function.Function<java.lang.Throwable, ? extends java.util.concurrent.CompletionStage<T>> arg0, java.util.concurrent.Executor arg1)
- =
  public static <U> java.util.concurrent.CompletableFuture<U> failedFuture(java.lang.Throwable arg0)
- =
  public static <U> java.util.concurrent.CompletionStage<U> failedStage(java.lang.Throwable arg0)
- =
  public T get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- =
  public T get(long arg0, java.util.concurrent.TimeUnit arg1) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
- =
  public T getNow(T arg0)
- =
  public int getNumberOfDependents()
- =
  public <U> java.util.concurrent.CompletableFuture<U> handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U> arg0)
- =
  public <U> java.util.concurrent.CompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U> arg0)
- =
  public <U> java.util.concurrent.CompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U> arg0, java.util.concurrent.Executor arg1)
- =
  public boolean isCancelled()
- =
  public boolean isCompletedExceptionally()
- =
  public boolean isDone()
- =
  public T join()
- =
  public java.util.concurrent.CompletionStage<T> minimalCompletionStage()
- =
  public <U> java.util.concurrent.CompletableFuture<U> newIncompleteFuture()
- =
  public void obtrudeException(java.lang.Throwable arg0)
- =
  public void obtrudeValue(T arg0)
- =
  public java.util.concurrent.CompletableFuture<T> orTimeout(long arg0, java.util.concurrent.TimeUnit arg1)
- =
  public T resultNow()
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBoth(java.util.concurrent.CompletionStage<?> arg0, java.lang.Runnable arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?> arg0, java.lang.Runnable arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?> arg0, java.lang.Runnable arg1, java.util.concurrent.Executor arg2)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEither(java.util.concurrent.CompletionStage<?> arg0, java.lang.Runnable arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?> arg0, java.lang.Runnable arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?> arg0, java.lang.Runnable arg1, java.util.concurrent.Executor arg2)
- =
  public static java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(java.lang.Runnable arg0)
- =
  public static java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(java.lang.Runnable arg0, java.util.concurrent.Executor arg1)
- =
  public java.util.concurrent.Future.State state()
- =
  public static <U> java.util.concurrent.CompletableFuture<U> supplyAsync(java.util.function.Supplier<U> arg0)
- =
  public static <U> java.util.concurrent.CompletableFuture<U> supplyAsync(java.util.function.Supplier<U> arg0, java.util.concurrent.Executor arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> thenAccept(java.util.function.Consumer<? super T> arg0)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T> arg0)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T> arg0, java.util.concurrent.Executor arg1)
- =
  public <U> java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U> arg0, java.util.function.BiConsumer<? super T, ? super U> arg1)
- =
  public <U> java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> arg0, java.util.function.BiConsumer<? super T, ? super U> arg1)
- =
  public <U> java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> arg0, java.util.function.BiConsumer<? super T, ? super U> arg1, java.util.concurrent.Executor arg2)
- =
  public <U> java.util.concurrent.CompletableFuture<U> thenApply(java.util.function.Function<? super T, ? extends U> arg0)
- =
  public <U> java.util.concurrent.CompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T, ? extends U> arg0)
- =
  public <U> java.util.concurrent.CompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T, ? extends U> arg0, java.util.concurrent.Executor arg1)
- =
  public <U, V> java.util.concurrent.CompletableFuture<V> thenCombine(java.util.concurrent.CompletionStage<? extends U> arg0, java.util.function.BiFunction<? super T, ? super U, ? extends V> arg1)
- =
  public <U, V> java.util.concurrent.CompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> arg0, java.util.function.BiFunction<? super T, ? super U, ? extends V> arg1)
- =
  public <U, V> java.util.concurrent.CompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> arg0, java.util.function.BiFunction<? super T, ? super U, ? extends V> arg1, java.util.concurrent.Executor arg2)
- =
  public <U> java.util.concurrent.CompletableFuture<U> thenCompose(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>> arg0)
- =
  public <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>> arg0)
- =
  public <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>> arg0, java.util.concurrent.Executor arg1)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> thenRun(java.lang.Runnable arg0)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable arg0)
- =
  public java.util.concurrent.CompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable arg0, java.util.concurrent.Executor arg1)
- =
  public java.util.concurrent.CompletableFuture<T> toCompletableFuture()
- =
  public java.lang.String toString()
- =
  public java.util.concurrent.CompletableFuture<T> whenComplete(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable> arg0)
- =
  public java.util.concurrent.CompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable> arg0)
- =
  public java.util.concurrent.CompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable> arg0, java.util.concurrent.Executor arg1)

## Summary

No differences.