Class LatLng.Builder (2.40.0)

public static final class LatLng.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LatLng.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LatLng.Builder
Overrides

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

clearField(Descriptors.FieldDescriptor field)

public LatLng.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
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.

clearOneof(Descriptors.OneofDescriptor oneof)

public LatLng.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
LatLng.Builder
Overrides

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LatLng.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LatLng.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public LatLng.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LatLng.Builder
Overrides

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.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public LatLng.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
LatLng.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final LatLng.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LatLng.Builder
Overrides