Package net.dv8tion.jda.internal.utils
Class FutureUtil
java.lang.Object
net.dv8tion.jda.internal.utils.FutureUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
U> CompletableFuture <U> thenApplyCancellable
(CompletableFuture<T> future, Function<T, U> applyFunction) static <T,
U> CompletableFuture <U> thenApplyCancellable
(CompletableFuture<T> future, Function<T, U> applyFunction, Runnable onCancel)
-
Constructor Details
-
FutureUtil
public FutureUtil()
-
-
Method Details
-
thenApplyCancellable
@Nonnull public static <T,U> CompletableFuture<U> thenApplyCancellable(@Nonnull CompletableFuture<T> future, @Nonnull Function<T, U> applyFunction, @Nullable Runnable onCancel) -
thenApplyCancellable
@Nonnull public static <T,U> CompletableFuture<U> thenApplyCancellable(@Nonnull CompletableFuture<T> future, @Nonnull Function<T, U> applyFunction)
-