Java Code Examples for java.util.concurrent.CompletableFuture#applyToEitherAsync()

The following examples show how to use java.util.concurrent.CompletableFuture#applyToEitherAsync() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CompletableFutureTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public <T,U> CompletableFuture<U> applyToEither
    (CompletableFuture<T> f,
     CompletionStage<? extends T> g,
     Function<? super T,U> a) {
    return f.applyToEitherAsync(g, a);
}
 
Example 2
Source File: CompletableFutureTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public <T,U> CompletableFuture<U> applyToEither
    (CompletableFuture<T> f,
     CompletionStage<? extends T> g,
     Function<? super T,U> a) {
    return f.applyToEitherAsync(g, a, new ThreadExecutor());
}
 
Example 3
Source File: CompletableFutureTest.java    From j2objc with Apache License 2.0 4 votes vote down vote up
public <T,U> CompletableFuture<U> applyToEither
    (CompletableFuture<T> f,
     CompletionStage<? extends T> g,
     Function<? super T,U> a) {
    return f.applyToEitherAsync(g, a);
}
 
Example 4
Source File: CompletableFutureTest.java    From j2objc with Apache License 2.0 4 votes vote down vote up
public <T,U> CompletableFuture<U> applyToEither
    (CompletableFuture<T> f,
     CompletionStage<? extends T> g,
     Function<? super T,U> a) {
    return f.applyToEitherAsync(g, a, new ThreadExecutor());
}