Batch.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static final class

# Batch.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.common.api.Batch.Builder

## Class Overview

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

## Summary

Public Constructors
| Batch.Builder(GoogleApiClient googleApiClient)

Public Methods
<R extends Result> BatchResultToken<R> | add(PendingResult<R> pendingResult) Adds a `PendingResult` to the batch.
Batch | build()

[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()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public Batch.Builder (GoogleApiClient googleApiClient)

## Public Methods

#### public BatchResultToken<R> add (PendingResult<R> pendingResult)

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 | Items to wait for completion of.

##### Returns

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

#### public Batch build ()