com.google.common.util.concurrent

## Interface AsyncFunction<I,O>

-     @GwtCompatible
      public interface AsyncFunction<I,O>

  Transforms a value, possibly asynchronously. For an example usage and more information, see `Futures.transformAsync(ListenableFuture, AsyncFunction)`.
  Since:
    11.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ListenableFuture<O>` | `apply(I input)` Returns an output `Future` to use in place of the given `input`.

- - ### Method Detail

    - #### apply

          ListenableFuture<O> apply(@Nullable
                                  I input)
                                    throws java.lang.Exception

      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`.

      Throws:
        `java.lang.Exception`