com.hammurapi.common.concurrent

## Class DelegatingRunnableFuture<V>

- java.lang.Object
- - com.hammurapi.common.concurrent.DelegatingRunnableFuture<V>

- All Implemented Interfaces:
    Runnable, Future<V>, RunnableFuture<V>

      public class DelegatingRunnableFuture<V>
      extends Object
      implements RunnableFuture<V>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DelegatingRunnableFuture(Callable<V> task)`
    `DelegatingRunnableFuture(Runnable command, V value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancel(boolean mayInterruptIfRunning)`
    `V` | `get()`
    `V` | `get(long timeout, TimeUnit unit)`
    `Runnable` | `getCommand()`
    `Callable<V>` | `getTask()`
    `V` | `getValue()`
    `boolean` | `isCancelled()`
    `boolean` | `isDone()`
    `void` | `run()`
    `void` | `setTarget(Future<V> target)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### DelegatingRunnableFuture

          public DelegatingRunnableFuture(Runnable command,
                                  V value)

    - #### DelegatingRunnableFuture

          public DelegatingRunnableFuture(Callable<V> task)

  - ### Method Detail

    - #### getCommand

          public Runnable getCommand()

    - #### getTask

          public Callable<V> getTask()

    - #### cancel

          public boolean cancel(boolean mayInterruptIfRunning)

      Specified by:
        `cancel` in interface `Future<V>`

    - #### isCancelled

          public boolean isCancelled()

      Specified by:
        `isCancelled` in interface `Future<V>`

    - #### isDone

          public boolean isDone()

      Specified by:
        `isDone` in interface `Future<V>`

    - #### get

          public V get()
                throws InterruptedException,
                       ExecutionException

      Specified by:
        `get` in interface `Future<V>`
      Throws:
        `InterruptedException`
        `ExecutionException`

    - #### get

          public V get(long timeout,
              TimeUnit unit)
                throws InterruptedException,
                       ExecutionException,
                       TimeoutException

      Specified by:
        `get` in interface `Future<V>`
      Throws:
        `InterruptedException`
        `ExecutionException`
        `TimeoutException`

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`
      Specified by:
        `run` in interface `RunnableFuture<V>`

    - #### setTarget

          public void setTarget(Future<V> target)

    - #### getValue

          public V getValue()