Class AsyncTaskResult<R,​E>

  • Type Parameters:
    R - type of the expected Result.
    E - type of the expected Error.

    public class AsyncTaskResult<R,​E>
    extends java.lang.Object
    Helper class to return results to the UI thread when using an AsyncTask.
    • Method Detail

      • create

        public static <RT,​ET> AsyncTaskResult<RT,​ET> create​(@Nullable
                                                                        RT result,
                                                                        ET error)
        Instantiates an AsyncTaskResult.
        Type Parameters:
        RT - type of the Result.
        ET - type of the error.
        result - The result value.
        error - The error value.
        a new instance of an AsyncTaskResult.
      • getResult

        public R getResult()
        the result value.
      • getError

        public E getError()
        the error value.