Package com.brightcove.ssai.tracking
Class AsyncTaskResult<R,E>
- java.lang.Object
-
- com.brightcove.ssai.tracking.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.ObjectHelper class to return results to the UI thread when using anAsyncTask.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <RT,ET>
AsyncTaskResult<RT,ET>create(RT result, ET error)Instantiates an AsyncTaskResult.EgetError()RgetResult()
-
-
-
Method Detail
-
create
public static <RT,ET> AsyncTaskResult<RT,ET> create(@Nullable RT result, @Nullable ET error)
Instantiates an AsyncTaskResult.- Type Parameters:
RT- type of the Result.ET- type of the error.- Parameters:
result- The result value.error- The error value.- Returns:
- a new instance of an AsyncTaskResult.
-
getResult
@Nullable public R getResult()
- Returns:
- the result value.
-
getError
@Nullable public E getError()
- Returns:
- the error value.
-
-