com.google.code.geocoder.model
Class LatLng

java.lang.Object
  extended by com.google.code.geocoder.model.LatLng
All Implemented Interfaces:
Serializable

public class LatLng
extends Object
implements Serializable

Author:
Michael Panchenko
See Also:
Serialized Form

Field Summary
static int DEFAULT_PRECISION
           
 
Constructor Summary
LatLng()
           
LatLng(BigDecimal lat, BigDecimal lng)
           
LatLng(String lat, String lng)
           
 
Method Summary
 boolean equals(Object o)
           
 BigDecimal getLat()
           
 BigDecimal getLng()
           
 int hashCode()
           
 void setLat(BigDecimal lat)
           
 void setLng(BigDecimal lng)
           
 String toString()
           
 String toUrlValue()
           
 String toUrlValue(int precision)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PRECISION

public static final int DEFAULT_PRECISION
See Also:
Constant Field Values
Constructor Detail

LatLng

public LatLng()

LatLng

public LatLng(BigDecimal lat,
              BigDecimal lng)

LatLng

public LatLng(String lat,
              String lng)
Method Detail

getLat

public BigDecimal getLat()

setLat

public void setLat(BigDecimal lat)

getLng

public BigDecimal getLng()

setLng

public void setLng(BigDecimal lng)

toUrlValue

public String toUrlValue()
Returns:
Returns a string of the form "lat,lng" for this LatLng. We round the lat/lng values to 6 decimal places by default.

toUrlValue

public String toUrlValue(int precision)
Parameters:
precision - We round the lat/lng values
Returns:
Returns a string of the form "lat,lng" for this LatLng.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.