|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.degreedays.api.Request
net.degreedays.api.data.LocationInfoRequest
public final class LocationInfoRequest
Defines a request for info about the station(s) that would be used to fulfil
an equivalent LocationDataRequest
. This is effectively a lightweight
alternative to LocationDataRequest
, primarily for use when you
want to know what station ID the API would use for a given
GeographicLocation
, without the overhead of actually fetching any
data.
A successfully-processed LocationInfoRequest
will result in a
LocationInfoResponse
.
LocationInfoRequest
mirrors LocationDataRequest
, so see
that class's docs for information on how to create a
LocationInfoRequest
.
DataApi.getLocationInfo(LocationInfoRequest)
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
Constructor Summary | |
---|---|
LocationInfoRequest(Location location,
DataSpecs dataSpecs)
Constructs a LocationInfoRequest object with the specified
Location and DataSpecs . |
Method Summary | |
---|---|
DataSpecs |
dataSpecs()
Returns the non-null DataSpecs object that specifies the
data that is desired from the specified location. |
boolean |
equals(java.lang.Object o)
Two LocationInfoRequest objects are equal if it can be
ascertained that they are specifying the same set(s) of data from the
same location. |
int |
hashCode()
Overridden to ensure consistency with equals . |
Location |
location()
Returns the non-null Location object for which data is
desired. |
java.lang.String |
toString()
Returns a non-null, non-empty string representation of this object for logging and debugging purposes. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocationInfoRequest(Location location, DataSpecs dataSpecs)
LocationInfoRequest
object with the specified
Location
and DataSpecs
.
location
- the non-null location for which data is desired.dataSpecs
- the non-null specification of the data that is desired from
the specified location.
java.lang.NullPointerException
- if location
or dataSpecs
is
null
.Method Detail |
---|
public Location location()
Location
object for which data is
desired.
public DataSpecs dataSpecs()
DataSpecs
object that specifies the
data that is desired from the specified location.
public boolean equals(java.lang.Object o)
LocationInfoRequest
objects are equal if it can be
ascertained that they are specifying the same set(s) of data from the
same location. In other words, they are equal if their
dataSpecs()
objects are equal and their location()
objects are equal.
equals
in class java.lang.Object
public int hashCode()
equals
.
hashCode
in class java.lang.Object
public java.lang.String toString()
The exact details of the representation are unspecified and subject to change.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |