code: public <TOut> Task<TOut> cast() {
      @SuppressWarnings("unchecked")
      Task<TOut> task = (Task<TOut>) this;
      return task;
    }
docs: Makes a fluent cast of a Task's result possible, avoiding an extra continuation just to cast
  the type of the result.