net.degreedays.api.data
Class LocationInfoResponse.Builder

java.lang.Object
  extended by 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.


Constructor Summary
LocationInfoResponse.Builder()
           
 
Method Summary
 LocationInfoResponse.Builder addSource(Source source)
           
 LocationInfoResponse build()
           
 LocationInfoResponse.Builder setMetadata(ResponseMetadata metadata)
           
 LocationInfoResponse.Builder setStationId(java.lang.String stationId)
           
 LocationInfoResponse.Builder setTargetLongLat(LongLat targetLongLat)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationInfoResponse.Builder

public LocationInfoResponse.Builder()
Method Detail

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/