net.degreedays.api.data.impl
Class LongLatLocation

java.lang.Object
  extended by net.degreedays.api.data.Location
      extended by net.degreedays.api.data.GeographicLocation
          extended by net.degreedays.api.data.impl.LongLatLocation
All Implemented Interfaces:
java.io.Serializable

public final class LongLatLocation
extends GeographicLocation
implements java.io.Serializable

Specifies a location in terms of longitude and latitude coordinates. The API will hunt for a weather station near the specified location that is able to supply the requested data, or it might (at some point) average data from multiple weather stations around the specified location if it thinks that might significantly improve results.

Make sure to specify the full range of data that you want when using this location type - some weather stations have less data than others so it's important for the API to have the full range when it's choosing which station(s) to use. The LocationDataResponse will include an station ID that will enable you to fetch new data calculated from the same weather station(s) used by the API initially.

See Also:
GeographicLocation

Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.


Constructor Summary
LongLatLocation(LongLat longLat)
          Constructs a LongLatLocation object with the specified longitude and latitude position.
 
Method Summary
 LongLat longLat()
          Returns the non-null longitude/latitude position of this LongLatLocation.
 java.lang.String toString()
          Returns a non-null, non-empty string representation of this object for logging and debugging purposes.
 
Methods inherited from class net.degreedays.api.data.Location
equals, hashCode, longLat, postalCode, stationId
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongLatLocation

public LongLatLocation(LongLat longLat)
Constructs a LongLatLocation object with the specified longitude and latitude position.

Parameters:
longLat - the non-null longitude/latitude position.
Throws:
java.lang.NullPointerException - if longLat is null.
Method Detail

longLat

public LongLat longLat()
Returns the non-null longitude/latitude position of this LongLatLocation.


toString

public java.lang.String toString()
Returns a non-null, non-empty string representation of this object for logging and debugging purposes.

The exact details of the representation are unspecified and subject to change.

Overrides:
toString in class java.lang.Object


www.degreedays.net/api/