Class Completable<T>
java.lang.Object
ca.spottedleaf.concurrentutil.completable.Completable<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <T> Completable<T> completed(T value) booleancompleteExceptionally(Throwable exception) exceptionally(Function<Throwable, ? extends T> function) exceptionally(Function<Throwable, ? extends T> function, Function<? super Throwable, ? extends Throwable> exceptionHandler) exceptionallyAsync(Function<Throwable, ? extends T> function) exceptionallyAsync(Function<Throwable, ? extends T> function, Executor executor) exceptionallyAsync(Function<Throwable, ? extends T> function, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) static <T> Completable<T> static <T> Completable<T> fromFuture(CompletionStage<T> stage) static Executor<U> Completable<U> handle(BiFunction<? super T, ? super Throwable, ? extends U> function) <U> Completable<U> handle(BiFunction<? super T, ? super Throwable, ? extends U> function, Function<? super Throwable, ? extends Throwable> exceptionHandler) <U> Completable<U> handleAsync(BiFunction<? super T, ? super Throwable, ? extends U> function) <U> Completable<U> handleAsync(BiFunction<? super T, ? super Throwable, ? extends U> function, Executor executor) <U> Completable<U> handleAsync(BiFunction<? super T, ? super Throwable, ? extends U> function, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) booleanisDone()booleanbooleanjoin()static <T> Completable<T> static <T> Completable<T> static <T> Completable<T> suppliedAsync(Supplier<T> supplier, Executor executor) static <T> Completable<T> suppliedAsync(Supplier<T> supplier, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) thenAccept(Consumer<? super T> consumer) thenAccept(Consumer<? super T> consumer, Function<? super Throwable, ? extends Throwable> exceptionHandler) thenAcceptAsync(Consumer<? super T> consumer) thenAcceptAsync(Consumer<? super T> consumer, Executor executor) thenAcceptAsync(Consumer<? super T> consumer, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) <U> Completable<U> <U> Completable<U> thenApply(Function<? super T, ? extends U> function, Function<? super Throwable, ? extends Throwable> exceptionHandler) <U> Completable<U> thenApplyAsync(Function<? super T, ? extends U> function) <U> Completable<U> thenApplyAsync(Function<? super T, ? extends U> function, Executor executor) <U> Completable<U> thenApplyAsync(Function<? super T, ? extends U> function, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) thenRunAsync(Runnable run) thenRunAsync(Runnable run, Executor executor) thenRunAsync(Runnable run, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) toFuture()whenComplete(BiConsumer<? super T, ? super Throwable> consumer) whenComplete(BiConsumer<? super T, ? super Throwable> consumer, Function<? super Throwable, ? extends Throwable> exceptionHandler) whenCompleteAsync(BiConsumer<? super T, ? super Throwable> consumer) whenCompleteAsync(BiConsumer<? super T, ? super Throwable> consumer, Executor executor) whenCompleteAsync(BiConsumer<? super T, ? super Throwable> consumer, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler)
-
Constructor Details
-
Completable
public Completable()
-
-
Method Details
-
getDefaultExecutor
-
completed
-
failed
-
supplied
-
supplied
public static <T> Completable<T> supplied(Supplier<T> supplier, Function<? super Throwable, ? extends Throwable> exceptionHandler) -
suppliedAsync
-
suppliedAsync
-
complete
-
completeExceptionally
-
isDone
public boolean isDone() -
isNormallyComplete
public boolean isNormallyComplete() -
isExceptionallyComplete
public boolean isExceptionallyComplete() -
getException
-
getNow
- Throws:
CompletionException
-
join
- Throws:
CompletionException
-
toFuture
-
fromFuture
-
thenApply
-
thenApply
-
thenApplyAsync
-
thenApplyAsync
public <U> Completable<U> thenApplyAsync(Function<? super T, ? extends U> function, Executor executor) -
thenApplyAsync
-
thenAccept
-
thenAccept
-
thenAcceptAsync
-
thenAcceptAsync
-
thenAcceptAsync
-
thenRun
-
thenRun
-
thenRunAsync
-
thenRunAsync
-
thenRunAsync
-
handle
-
handle
public <U> Completable<U> handle(BiFunction<? super T, ? super Throwable, ? extends U> function, Function<? super Throwable, ? extends Throwable> exceptionHandler) -
handleAsync
-
handleAsync
public <U> Completable<U> handleAsync(BiFunction<? super T, ? super Throwable, ? extends U> function, Executor executor) -
handleAsync
public <U> Completable<U> handleAsync(BiFunction<? super T, ? super Throwable, ? extends U> function, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) -
whenComplete
-
whenComplete
public Completable<T> whenComplete(BiConsumer<? super T, ? super Throwable> consumer, Function<? super Throwable, ? extends Throwable> exceptionHandler) -
whenCompleteAsync
-
whenCompleteAsync
public Completable<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> consumer, Executor executor) -
whenCompleteAsync
public Completable<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> consumer, Executor executor, Function<? super Throwable, ? extends Throwable> exceptionHandler) -
exceptionally
-
exceptionally
-
exceptionallyAsync
-
exceptionallyAsync
-
exceptionallyAsync
-