java.lang.Object |
↳ |
com.google.android.gms.tasks.TaskCompletionSource<TResult> |
Summary
Public Methods |
Task<TResult>
|
getTask()
Returns the Task.
|
void
|
setException(Exception e)
Completes the Task with the specified exception.
|
void
|
setResult(TResult result)
Completes the Task with the specified result.
|
boolean
|
trySetException(Exception e)
Completes the Task with the specified exception, unless the Task has already completed.
|
boolean
|
trySetResult(TResult result)
Completes the Task with the specified result, unless the Task has already completed.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
TaskCompletionSource
()
Public Methods
public
Task<TResult>
getTask
()
public
void
setException
(Exception e)
Completes the Task with the specified exception.
Throws |
IllegalStateException |
if the Task is already complete
|
public
void
setResult
(TResult result)
Completes the Task with the specified result.
Parameters |
result |
TResult
|
Throws |
IllegalStateException |
if the Task is already complete
|
public
boolean
trySetException
(Exception e)
Completes the Task with the specified exception, unless the Task has already completed. If
the Task has already completed, the call does nothing.
Returns |
boolean |
true if the exception was set successfully, false otherwise
|
public
boolean
trySetResult
(TResult result)
Completes the Task with the specified result, unless the Task has already completed. If
the Task has already completed, the call does nothing.
Parameters |
result |
TResult
|
Returns |
boolean |
true if the result was set successfully, false otherwise
|