com.oopitis.weather
Class GeoLocation.Coordinates

java.lang.Object
  extended by com.oopitis.weather.GeoLocation.Coordinates
Enclosing class:
GeoLocation

public static class GeoLocation.Coordinates
extends java.lang.Object

Geographical coordinates for a location. Each object contains a latitude and a longitude. The equator has a latitude of 0°, the North pole has a latitude of 90°, and the South pole has a latitude -90°. The Prime Meridian, based at the Royal Observatory, Greenwich has a longitude 0°. Longitudes range from 0° to 180° eastward and -180° westward.


Method Summary
 float latitude()
          Returns the latitude, ranging from -90 to 90.
 float longitude()
          Returns the longitude, ranging from -180 to 180.
 java.lang.String toString()
          Returns this location as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

latitude

public float latitude()
Returns the latitude, ranging from -90 to 90.

Returns:
the latitude

longitude

public float longitude()
Returns the longitude, ranging from -180 to 180.

Returns:
the longitude

toString

public java.lang.String toString()
Returns this location as a string. The format is "latitude,longitude" (with no space in between).

Overrides:
toString in class java.lang.Object
Returns:
this location as a string