Package one.nio.async

Class CompletedFuture<V>

java.lang.Object
one.nio.async.CompletedFuture<V>
All Implemented Interfaces:
Serializable, Future<V>

public class CompletedFuture<V> extends Object implements Future<V>, Serializable
See Also:
  • Constructor Details

    • CompletedFuture

      public CompletedFuture(V value)
  • Method Details

    • 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()
      Specified by:
      get in interface Future<V>
    • get

      public V get(long timeout, TimeUnit unit)
      Specified by:
      get in interface Future<V>