CompletableFuture uniApply方法

时间:2018-11-16 12:22:38

标签: java java-8 completable-future

我想知道Java8 CompletableFuture类的 uniApply 的使用。

我感到困惑。例如,代码部分:

private <V> CompletableFuture<V> uniApplyStage(
    Executor e, Function<? super T,? extends V> f) {
    if (f == null) throw new NullPointerException();
    CompletableFuture<V> d =  new CompletableFuture<V>();
    if (e != null || !d.uniApply(this, f, null)) {
        UniApply<T,V> c = new UniApply<T,V>(e, d, this, f);
        push(c);
        c.tryFire(SYNC);
    }
    return d;
}

0 个答案:

没有答案
相关问题