result.DependentResultImpl_ Extends goog.result.SimpleResult
A DependentResult represents a Result whose eventual value depends on the value of one or more other Results. For example, the Result returned by

Inheritance

Constructor

goog.result.DependentResultImpl_(parentResults)

Parameters

parentResults : !Array.<!goog.result.Result>
A list of Results that will affect the eventual value of this Result.

Instance Methods

Public Protected Private
addParentResult(parentResult)
Adds a Result to the list of Results that affect this one.
Arguments:
parentResult : !goog.result.Result
A result whose value affects the value of this Result.
code »
getParentResults()
No description.
code »
callHandlers_()
Calls the handlers registered for this Result.
code »
cancel() boolean
Cancels the Result.
Returns: boolean  Whether the result was canceled. It will not be canceled if the result was already canceled or has already resolved.
code »
getError()
No description.
code »
getState()
No description.
code »
getValue()
No description.
code »
isCanceled()
No description.
code »
isPending_() boolean
No description.
Returns: boolean  Whether the Result is pending.
code »
setError(opt_error)
Sets the Result to be an error Result.
Arguments:
opt_error : *=
Optional error slug to set for this Result.
code »
setValue(value)
Sets the value of this Result, changing the state.
Arguments:
value : *
The value to set for this Result.
code »
then()
No description.
code »
wait(handleropt_scope)
Attaches handlers to be called when the value of this Result is available.
Arguments:
handler : !function(this:T, !goog.result.SimpleResult)
The function called when the value is available. The function is passed the Result object as the only argument.
opt_scope : T=
Optional scope for the handler.
code »

Instance Properties

constructor :
No description.
Code »
parentResults_ :
A list of Results that will affect the eventual value of this Result.
Code »
error_ :
The error slug for this Result.
Code »
handlers_ :
The list of handlers to call when this Result is resolved.
Code »
state_ :
The current state of this Result.
Code »
value_ :
The 'value' of this Result.
Code »

Static Properties

goog.result.DependentResultImpl_.superClass_ :
No description.
Code »

Package result

Package Reference