Batch.Builder

class Batch.Builder


Builder for Batch objects. Note that this class is not thread-safe, by design.

Summary

Public constructors

Builder(googleApiClient: GoogleApiClient!)

Public functions

BatchResultToken<R!>!
<R : Result?> add(pendingResult: PendingResult<R!>!)

Adds a PendingResult to the batch.

Batch!

Public constructors

Builder

Builder(googleApiClient: GoogleApiClient!)

Public functions

add

fun <R : Result?> add(pendingResult: PendingResult<R!>!): BatchResultToken<R!>!

Adds a PendingResult to the batch. The returned token can be used to retrieve the result from the BatchResult passed to the result callback.

Parameters
pendingResult: PendingResult<R!>!

Items to wait for completion of.

Returns
BatchResultToken<R!>!

The result token to use to get the result from the BatchResult.

build

fun build(): Batch!