com.kii.cloud.storage
Class GeoPoint

java.lang.Object
  extended by com.kii.cloud.storage.GeoPoint

public class GeoPoint
extends java.lang.Object

Represents geo point.


Constructor Summary
GeoPoint(double latitude, double longitude)
          Create an instance of GeoPoint with the given latitude and longitude.
 
Method Summary
 boolean equals(java.lang.Object rh)
          Return true when both latitude and longitude of given object are equal to this.
 double getLatitude()
          Return the latitude.
 double getLongitude()
          Return the longitude.
 int hashCode()
           
 JSONObject toJSON()
          Returns JSON representation of this GeoPoint.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoPoint

public GeoPoint(double latitude,
                double longitude)
Create an instance of GeoPoint with the given latitude and longitude.

Parameters:
latitude - Latitude of the point in degrees. Valid if the value is greater than -90 degrees and less than +90 degrees.
longitude - Longitude of the point in degrees. Valid if the value is greater than -180 degrees and less than +180 degrees.
Throws:
java.lang.IllegalArgumentException - when the specified argument is out of range.
Method Detail

equals

public boolean equals(java.lang.Object rh)
Return true when both latitude and longitude of given object are equal to this.

Overrides:
equals in class java.lang.Object
Parameters:
object - to compare against this.
Returns:
true when it is equal.

getLatitude

public double getLatitude()
Return the latitude.

Returns:
latitude.

getLongitude

public double getLongitude()
Return the longitude.

Returns:
longitude.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toJSON

public JSONObject toJSON()
Returns JSON representation of this GeoPoint.

Returns:
JSON representation of this GeoPoint.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String representation(JSON) of this GeoPoint.
See Also:
toJSON()