Last active
December 6, 2016 23:23
-
-
Save rayhon1014/f78378918f4cc673f65d61db51e678e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier) { | |
return asyncSupplyStage(asyncPool, supplier); | |
} | |
public <U> CompletableFuture<U> thenApply(Function<? super T,? extends U> fn) { | |
return uniApplyStage(null, fn); | |
} | |
public CompletableFuture<Void> thenAccept(Consumer<? super T> action) { | |
return uniAcceptStage(null, action); | |
} | |
public CompletableFuture<Void> thenRun(Runnable action) { | |
return uniRunStage(null, action); | |
} | |
public <U,V> CompletableFuture<V> thenCombine(CompletionStage<? extends U> other, | |
BiFunction<? super T,? super U,? extends V> fn) { | |
return biApplyStage(null, other, fn); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment