CompletableFuture.ThenApplyAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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 文件以了解特殊完成的規則。
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
計算回傳完結階段值的函數
- executor
- IExecutor
執行者用於非同步執行
傳回
新的完成階段
實作
- 屬性
備註
回傳一個新的 CompletionStage,當該階段正常完成時,會使用所提供的執行器執行,該階段的結果作為所提供函式的參數。 請參閱 CompletionStage 文件以了解特殊完成的規則。
Java 參考 java.util.concurrent.CompletableFuture.thenApplyAsync。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。