Class ResultAdapter<T>

  • All Implemented Interfaces:
    Result<T>

    public class ResultAdapter<T>
    extends Object
    implements Result<T>
    Adapts a Future object to a (much more convenient) Result object.
    Author:
    Jeff Schnitzer
    • Constructor Detail

      • ResultAdapter

        public ResultAdapter​(Future<T> fut)
    • Method Detail

      • now

        public T now()
        Description copied from interface: Result
        Waits if necessary for the computation to complete, and then retrieves its result. If the computation produced an exception, it will be thrown here.
        Specified by:
        now in interface Result<T>
        Returns:
        the computed result