It is similar to Guava's AsyncFunction, redeclared so that Guava can be shaded.
Type Parameters
Name
Description
I
O
Methods
apply(I input)
publicabstractApiFuture<O>apply(Iinput)
Returns an output Future to use in place of the given input. The output Future need not be
done, making AsyncFunction suitable for asynchronous derivations.
Throwing an exception from this method is equivalent to returning a failing Future.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-15 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eApiAsyncFunction\u003c/code\u003e interface within the Google API Common library for Java, specifically detailing its role in transforming values asynchronously.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation covers a wide range of versions, from the latest version 2.46.1 down to version 2.1.2, allowing developers to reference the \u003ccode\u003eApiAsyncFunction\u003c/code\u003e implementation across different releases.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eApiAsyncFunction\u003c/code\u003e is designed to work similarly to Guava's \u003ccode\u003eAsyncFunction\u003c/code\u003e but is redeclared to enable shading, ensuring compatibility and preventing conflicts within projects.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eapply(I input)\u003c/code\u003e method within the interface is detailed, explaining that it takes an input of type I and returns an \u003ccode\u003eApiFuture\u003c/code\u003e of type O, which might not be completed at the time of the call, allowing for asynchronous derivations.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation also highlights that an exception thrown from the \u003ccode\u003eapply\u003c/code\u003e method will be equivalent to returning a failed \u003ccode\u003eFuture\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,[]]