|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.degreedays.api.data.Location
net.degreedays.api.data.impl.StationIdLocation
public final class StationIdLocation
Specifies a location in terms of a weather station ID (you can find these IDs through the website at www.degreedays.net or by requesting data from geographic locations).
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
Constructor Summary | |
---|---|
StationIdLocation(java.lang.String stationId)
Constructs a StationIdLocation object with the specified
weather station ID. |
Method Summary | |
---|---|
java.lang.String |
stationId()
Returns the non-null, non-empty string ID of the weather station that this StationIdLocation represents. |
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 |
---|
public StationIdLocation(java.lang.String stationId) throws java.lang.IllegalArgumentException
StationIdLocation
object with the specified
weather station ID.
stationId
- the non-null, non-empty ID of the weather station that
the StationIdLocation
should represent (i.e. the
station you want data for). Cannot contain contain any characters
other than [-_0-9a-zA-Z]
, and cannot contain more
than 60 characters (a limit that is significantly larger than the
length of any station ID that we are currently aware of, but that
is set high to allow for "virtual station IDs" to be introduced in
the future, combining data from multiple stations).
java.lang.NullPointerException
- if stationId
is
null
.
java.lang.IllegalArgumentException
- if tests indicate that
stationId
fails to match the specification detailed
above.Method Detail |
---|
public java.lang.String stationId()
StationIdLocation
represents.
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 |