public final class StationIdLocation extends Location implements java.io.Serializable
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
Constructor and Description |
---|
StationIdLocation(java.lang.String stationId)
Constructs a
StationIdLocation object with the specified
weather station ID. |
Modifier and Type | Method and Description |
---|---|
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.
|
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.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
See www.degreedays.net/api/ for more about the Degree Days.net API.
You can sign up for a Degree Days.net API account and read the integration guide that is useful and applicable whether you are using Java or not.