public final class CompletableFutureUtils extends Object
CompletableFuture
.Modifier and Type | Method and Description |
---|---|
static <U> CompletableFuture<U> |
failedFuture(Throwable t)
Convenience method for creating a future that is immediately completed
exceptionally with the given
Throwable . |
public static <U> CompletableFuture<U> failedFuture(Throwable t)
Throwable
.
Similar to CompletableFuture#failedFuture
which was added in
Java 9.
U
- The type of the element.t
- The failure.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.