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, which is used for transforming values, potentially asynchronously.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eApiAsyncFunction\u003c/code\u003e interface is a redeclaration of Guava's \u003ccode\u003eAsyncFunction\u003c/code\u003e, specifically designed to be compatible with shaded Guava.\u003c/p\u003e\n"],["\u003cp\u003eThe primary method of \u003ccode\u003eApiAsyncFunction\u003c/code\u003e is \u003ccode\u003eapply(I input)\u003c/code\u003e, which takes an input of type \u003ccode\u003eI\u003c/code\u003e and returns an \u003ccode\u003eApiFuture\u003c/code\u003e of type \u003ccode\u003eO\u003c/code\u003e, allowing for asynchronous operations.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation covers multiple versions of \u003ccode\u003eApiAsyncFunction\u003c/code\u003e, ranging from version 2.1.2 up to the latest version, 2.46.1, and provides links to each of those versions.\u003c/p\u003e\n"],["\u003cp\u003eThe listed exceptions section indicates that the \u003ccode\u003eapply()\u003c/code\u003e method can throw a general \u003ccode\u003eException\u003c/code\u003e, which results in a failing Future being returned.\u003c/p\u003e\n"]]],[],null,[]]