public static final class LocationDataResponse.Builder
extends java.lang.Object
LocationDataResponse
objects e.g. for testing purposes.Instances of this builder class are designed for single-threaded use only. It's fine to create and use instances in multiple concurrent threads, but, in the absence of external synchronization, the use of each individual builder instance should be restricted to one thread only.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
LocationDataResponse.Builder |
addSource(Source source) |
LocationDataResponse |
build() |
LocationDataResponse.Builder |
setDataSets(DataSets dataSets) |
LocationDataResponse.Builder |
setMetadata(ResponseMetadata metadata) |
LocationDataResponse.Builder |
setStationId(java.lang.String stationId) |
LocationDataResponse.Builder |
setTargetLongLat(LongLat targetLongLat) |
public LocationDataResponse.Builder setMetadata(ResponseMetadata metadata)
public LocationDataResponse.Builder setStationId(java.lang.String stationId)
public LocationDataResponse.Builder setTargetLongLat(LongLat targetLongLat)
public LocationDataResponse.Builder addSource(Source source)
public LocationDataResponse.Builder setDataSets(DataSets dataSets)
public LocationDataResponse build()
java.lang.IllegalStateException
- if the
station ID, the
target longitude/latitude, and
the DataSets have not all been set,
or if no sources have been added.
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.