java.lang.Object | |
↳ | com.google.android.gms.tasks.Tasks |
Task
utility methods.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Blocks until the specified Task is complete.
| |||||||||||
Blocks until the specified Task is complete.
| |||||||||||
Returns a Task that will be completed with the result of the specified Callable.
| |||||||||||
Returns a Task that will be completed with the result of the specified Callable.
| |||||||||||
Returns a completed Task with the specified exception.
| |||||||||||
Returns a completed Task with the specified result.
| |||||||||||
Returns a Task that completes successfully when all of the specified Tasks complete
successfully.
| |||||||||||
Returns a Task that completes successfully when all of the specified Tasks complete
successfully.
| |||||||||||
Returns a Task with a list of tasks that completes successfully when all of the specified Tasks
complete.
| |||||||||||
Returns a Task with a list of tasks that completes successfully when all of the specified Tasks
complete.
| |||||||||||
Returns a Task with a list of task results that completes successfully when all of the
specified Tasks complete successfully.
| |||||||||||
Returns a Task with a list of task results that completes successfully when all of the
specified Tasks complete successfully.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Blocks until the specified Task is complete.
Parameters | |
---|---|
task |
Task |
timeout |
long |
unit |
TimeUnit |
Returns | |
---|---|
TResult |
the Task's result |
Throws | |
---|---|
ExecutionException |
if the Task fails |
InterruptedException |
if an interrupt occurs while waiting for the Task to complete |
TimeoutException |
if the specified timeout is reached before the Task completes |
Blocks until the specified Task is complete.
Parameters | |
---|---|
task |
Task |
Returns | |
---|---|
TResult |
the Task's result |
Throws | |
---|---|
ExecutionException |
if the Task fails |
InterruptedException |
if an interrupt occurs while waiting for the Task to complete |
Returns a Task that will be completed with the result of the specified Callable.
The Callable will be called on the main application thread.
Parameters | |
---|---|
callable |
Callable |
Returns | |
---|---|
Task<TResult> |
Returns a Task that will be completed with the result of the specified Callable.
Parameters | |
---|---|
executor |
Executor : the Executor to use to call the Callable
|
callable |
Callable |
Returns | |
---|---|
Task<TResult> |
Returns a Task that completes successfully when all of the specified Tasks complete successfully. Does not accept nulls.
Parameters | |
---|---|
tasks |
Collection |
Returns | |
---|---|
Task<Void> |
Throws | |
---|---|
NullPointerException |
if any of the provided Tasks are null |
Returns a Task that completes successfully when all of the specified Tasks complete successfully. Does not accept nulls.
Parameters | |
---|---|
tasks |
Task |
Returns | |
---|---|
Task<Void> |
Throws | |
---|---|
NullPointerException |
if any of the provided Tasks are null |
Returns a Task with a list of tasks that completes successfully when all of the specified Tasks complete. This task would always success even if any of the provided Tasks fail. Does not accept nulls.
Parameters | |
---|---|
tasks |
Task |
Returns | |
---|---|
Task<List<Task<?>>> |
Throws | |
---|---|
NullPointerException |
if any of the provided Tasks are null |
Returns a Task with a list of tasks that completes successfully when all of the specified Tasks complete. This task would always success even if any of the provided Tasks fail. Does not accept nulls.
Parameters | |
---|---|
tasks |
Collection |
Returns | |
---|---|
Task<List<Task<?>>> |
Throws | |
---|---|
NullPointerException |
if any of the provided Tasks are null |
Returns a Task with a list of task results that completes successfully when all of the specified Tasks complete successfully. This task would fail if any of the provided Tasks fail. Does not accept nulls.
Parameters | |
---|---|
tasks |
Collection |
Returns | |
---|---|
Task<List<TResult>> |
Throws | |
---|---|
NullPointerException |
if any of the provided Tasks are null |
Returns a Task with a list of task results that completes successfully when all of the specified Tasks complete successfully. This task would fail if any of the provided Tasks fail. Does not accept nulls.
Parameters | |
---|---|
tasks |
Task |
Returns | |
---|---|
Task<List<TResult>> |
Throws | |
---|---|
NullPointerException |
if any of the provided Tasks are null |