mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
add more direct listener methods
This commit is contained in:
@@ -19,6 +19,16 @@ public interface Promise<T> {
|
||||
|
||||
PromiseFactory getFactory();
|
||||
|
||||
@NotNull Promise<Void> thenRun(@NotNull ExceptionalRunnable task);
|
||||
|
||||
@NotNull Promise<Void> thenConsume(@NotNull ExceptionalConsumer<T> task);
|
||||
|
||||
<V> @NotNull Promise<V> thenSupply(@NotNull ExceptionalSupplier<V> task);
|
||||
|
||||
<V> @NotNull Promise<V> thenApply(@NotNull ExceptionalFunction<T, V> task);
|
||||
|
||||
<V> @NotNull Promise<V> thenCompose(@NotNull ExceptionalFunction<T, Promise<V>> task);
|
||||
|
||||
@NotNull Promise<Void> thenRunSync(@NotNull ExceptionalRunnable task);
|
||||
|
||||
@NotNull Promise<Void> thenRunDelayedSync(@NotNull ExceptionalRunnable task, long delay, @NotNull TimeUnit unit);
|
||||
|
||||
Reference in New Issue
Block a user