Class LatLng.Builder (2.65.0)

public static final class LatLng.Builder extends GeneratedMessage.Builder<LatLng.Builder> implements LatLngOrBuilder

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 standard</a>. Values must be within normalized ranges.

Protobuf type google.type.LatLng

Implements

LatLngOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public LatLng build()
Returns
Type Description
LatLng

buildPartial()

public LatLng buildPartial()
Returns
Type Description
LatLng

clear()

public LatLng.Builder clear()
Returns
Type Description
LatLng.Builder
Overrides

clearLatitude()

public LatLng.Builder clearLatitude()

The latitude in degrees. It must be in the range [-90.0, +90.0].

double latitude = 1;

Returns
Type Description
LatLng.Builder

This builder for chaining.

clearLongitude()

public LatLng.Builder clearLongitude()

The longitude in degrees. It must be in the range [-180.0, +180.0].

double longitude = 2;

Returns
Type Description
LatLng.Builder

This builder for chaining.

getDefaultInstanceForType()

public LatLng getDefaultInstanceForType()
Returns
Type Description
LatLng

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLatitude()

public double getLatitude()

The latitude in degrees. It must be in the range [-90.0, +90.0].

double latitude = 1;

Returns
Type Description
double

The latitude.

getLongitude()

public double getLongitude()

The longitude in degrees. It must be in the range [-180.0, +180.0].

double longitude = 2;

Returns
Type Description
double

The longitude.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public LatLng.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LatLng.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public LatLng.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
LatLng.Builder
Overrides

mergeFrom(LatLng other)

public LatLng.Builder mergeFrom(LatLng other)
Parameter
Name Description
other LatLng
Returns
Type Description
LatLng.Builder

setLatitude(double value)

public LatLng.Builder setLatitude(double value)

The latitude in degrees. It must be in the range [-90.0, +90.0].

double latitude = 1;

Parameter
Name Description
value double

The latitude to set.

Returns
Type Description
LatLng.Builder

This builder for chaining.

setLongitude(double value)

public LatLng.Builder setLongitude(double value)

The longitude in degrees. It must be in the range [-180.0, +180.0].

double longitude = 2;

Parameter
Name Description
value double

The longitude to set.

Returns
Type Description
LatLng.Builder

This builder for chaining.