org.springframework.util.concurrent

## 类 FutureAdapter<T,S>

- java.lang.Object
- - org.springframework.util.concurrent.FutureAdapter<T,S>

- 类型参数:
    `T` - the type of this `Future`
    `S` - the type of the adaptee's `Future`
  所有已实现的接口:
    Future<T>
  直接已知子类:
    ListenableFutureAdapter

      public abstract class FutureAdapter<T,S>
      extends Object
      implements Future<T>

  Abstract class that adapts a `Future` parameterized over S into a `Future` parameterized over T. All methods are delegated to the adaptee, where `get()` and `get(long, TimeUnit)` call `adapt(Object)` on the adaptee's result.
  从以下版本开始:
    4.0
  作者:
    Arjen Poutsma

- - ### 构造器概要

    构造器
    限定符 | 构造器和说明
    --- | ---
    `protected` | `FutureAdapter(Future<S> adaptee)` Constructs a new `FutureAdapter` with the given adaptee.

  - ### 方法概要

    所有方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected abstract T` | `adapt(S adapteeResult)` Adapts the given adaptee's result into T.
    `boolean` | `cancel(boolean mayInterruptIfRunning)`
    `T` | `get()`
    `T` | `get(long timeout, TimeUnit unit)`
    `protected Future<S>` | `getAdaptee()` Returns the adaptee.
    `boolean` | `isCancelled()`
    `boolean` | `isDone()`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### FutureAdapter

          protected FutureAdapter(Future<S> adaptee)

      Constructs a new `FutureAdapter` with the given adaptee.
      参数:
        `adaptee` - the future to delegate to

  - ### 方法详细资料

    - #### getAdaptee

          protected Future<S> getAdaptee()

      Returns the adaptee.

    - #### cancel

          public boolean cancel(boolean mayInterruptIfRunning)

      指定者:
        `cancel` 在接口中 `Future<T>`

    - #### isCancelled

          public boolean isCancelled()

      指定者:
        `isCancelled` 在接口中 `Future<T>`

    - #### isDone

          public boolean isDone()

      指定者:
        `isDone` 在接口中 `Future<T>`

    - #### get

          @Nullable
          public T get()
                           throws InterruptedException,
                                  ExecutionException

      指定者:
        `get` 在接口中 `Future<T>`
      抛出:
        `InterruptedException`
        `ExecutionException`

    - #### get

          @Nullable
          public T get(long timeout,
                                  TimeUnit unit)
                           throws InterruptedException,
                                  ExecutionException,
                                  TimeoutException

      指定者:
        `get` 在接口中 `Future<T>`
      抛出:
        `InterruptedException`
        `ExecutionException`
        `TimeoutException`

    - #### adapt

          @Nullable
          protected abstract T adapt(S adapteeResult)
                                         throws ExecutionException

      Adapts the given adaptee's result into T.
      返回:
        the adapted result
      抛出:
        `ExecutionException`