语言

CompletableFuture.ThenApplyAsync 方法

定义

重载

名称 说明
ThenApplyAsync(IFunction)

返回一个新的 CompletionStage,当此阶段正常完成时,使用此阶段的默认异步执行工具执行,此阶段的结果作为提供函数的参数。

ThenApplyAsync(IFunction, IExecutor)

返回一个新的 CompletionStage,当此阶段正常完成时,使用提供的执行程序执行,此阶段的结果作为提供的函数的参数。

ThenApplyAsync(IFunction)

返回一个新的 CompletionStage,当此阶段正常完成时,使用此阶段的默认异步执行工具执行,此阶段的结果作为提供函数的参数。

[Android.Runtime.Register("thenApplyAsync", "(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;", "GetThenApplyAsync_Ljava_util_function_Function_Handler", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "U" })]
public virtual Java.Util.Concurrent.ICompletionStage? ThenApplyAsync(Java.Util.Functions.IFunction? fn);
[<Android.Runtime.Register("thenApplyAsync", "(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;", "GetThenApplyAsync_Ljava_util_function_Function_Handler", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "U" })>]
abstract member ThenApplyAsync : Java.Util.Functions.IFunction -> Java.Util.Concurrent.ICompletionStage
override this.ThenApplyAsync : Java.Util.Functions.IFunction -> Java.Util.Concurrent.ICompletionStage

参数

fn
IFunction

用于计算返回的 CompletionStage 值的函数

返回

新的 CompletionStage

实现

属性

注解

返回一个新的 CompletionStage,当此阶段正常完成时,使用此阶段的默认异步执行工具执行,此阶段的结果作为提供函数的参数。 有关涵盖异常完成的规则,请参阅 CompletionStage 文档。

Java参考java.util.concurrent.CompletableFuture.thenApplyAsync。

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

ThenApplyAsync(IFunction, IExecutor)

返回一个新的 CompletionStage,当此阶段正常完成时,使用提供的执行程序执行,此阶段的结果作为提供的函数的参数。

[Android.Runtime.Register("thenApplyAsync", "(Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;", "GetThenApplyAsync_Ljava_util_function_Function_Ljava_util_concurrent_Executor_Handler", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "U" })]
public virtual Java.Util.Concurrent.ICompletionStage? ThenApplyAsync(Java.Util.Functions.IFunction? fn, Java.Util.Concurrent.IExecutor? executor);
[<Android.Runtime.Register("thenApplyAsync", "(Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;", "GetThenApplyAsync_Ljava_util_function_Function_Ljava_util_concurrent_Executor_Handler", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "U" })>]
abstract member ThenApplyAsync : Java.Util.Functions.IFunction * Java.Util.Concurrent.IExecutor -> Java.Util.Concurrent.ICompletionStage
override this.ThenApplyAsync : Java.Util.Functions.IFunction * Java.Util.Concurrent.IExecutor -> Java.Util.Concurrent.ICompletionStage

参数

fn
IFunction

用于计算返回的 CompletionStage 值的函数

executor
IExecutor

要用于异步执行的执行程序

返回

新的 CompletionStage

实现

属性

注解

返回一个新的 CompletionStage,当此阶段正常完成时,使用提供的执行程序执行,此阶段的结果作为提供的函数的参数。 有关涵盖异常完成的规则,请参阅 CompletionStage 文档。

Java参考java.util.concurrent.CompletableFuture.thenApplyAsync。

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于