net.degreedays.api.data
Class LocationInfoResponse.Builder
java.lang.Object
net.degreedays.api.data.LocationInfoResponse.Builder
- Enclosing class:
- LocationInfoResponse
public static final class LocationInfoResponse.Builder
- extends java.lang.Object
A builder class for creating immutable LocationInfoResponse
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.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocationInfoResponse.Builder
public LocationInfoResponse.Builder()
setMetadata
public LocationInfoResponse.Builder setMetadata(ResponseMetadata metadata)
setStationId
public LocationInfoResponse.Builder setStationId(java.lang.String stationId)
setTargetLongLat
public LocationInfoResponse.Builder setTargetLongLat(LongLat targetLongLat)
addSource
public LocationInfoResponse.Builder addSource(Source source)
build
public LocationInfoResponse build()
- Throws:
java.lang.IllegalStateException
- if the station ID and the
target longitude/latitude
have not both been set, or if no sources have been added.
www.degreedays.net/api/