Class Location.LocationBuilder
- java.lang.Object
-
- com.funnelback.publicui.search.model.geolocation.Location.LocationBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private String
city
private String
countryCode
private Integer
countryGeoNameId
private String
countryName
private Double
latitude
private Double
longitude
private Integer
metroCode
private String
postalCode
private List<Location.Subdivision>
subdivisions
-
Constructor Summary
Constructors Constructor Description LocationBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Location
build()
Location.LocationBuilder
city(String city)
The city name of the represented location if it can be determined, otherwise null.Location.LocationBuilder
countryCode(String countryCode)
The two letter country code (ISO 3166-1 alpha code) of the represented location if it can be determined, otherwise null.Location.LocationBuilder
countryGeoNameId(Integer countryGeoNameId)
The GeoName ID of the country.Location.LocationBuilder
countryName(String countryName)
The full country name of the represented location if it can be determined, otherwise null.Location.LocationBuilder
latitude(Double latitude)
The latitude of the represented location.Location.LocationBuilder
longitude(Double longitude)
The longitude of the represented location.Location.LocationBuilder
metroCode(Integer metroCode)
The metro code of the represented location if it can be determined, otherwise zero.Location.LocationBuilder
postalCode(String postalCode)
The postal code of the represented location if it can be determined, otherwise null.Location.LocationBuilder
subdivisions(List<Location.Subdivision> subdivisions)
The subdivisions of the location.String
toString()
-
-
-
Field Detail
-
city
private String city
-
countryCode
private String countryCode
-
countryName
private String countryName
-
countryGeoNameId
private Integer countryGeoNameId
-
latitude
private Double latitude
-
longitude
private Double longitude
-
metroCode
private Integer metroCode
-
postalCode
private String postalCode
-
subdivisions
private List<Location.Subdivision> subdivisions
-
-
Method Detail
-
city
public Location.LocationBuilder city(String city)
The city name of the represented location if it can be determined, otherwise null.- Returns:
this
.- Since:
- 13.0
-
countryCode
public Location.LocationBuilder countryCode(String countryCode)
The two letter country code (ISO 3166-1 alpha code) of the represented location if it can be determined, otherwise null.- Returns:
this
.- Since:
- 13.0
-
countryName
public Location.LocationBuilder countryName(String countryName)
The full country name of the represented location if it can be determined, otherwise null.- Returns:
this
.- Since:
- 13.0
-
countryGeoNameId
public Location.LocationBuilder countryGeoNameId(Integer countryGeoNameId)
The GeoName ID of the country.- Returns:
this
.- Since:
- 15.24
-
latitude
public Location.LocationBuilder latitude(Double latitude)
The latitude of the represented location.
Defaults to zero if it cannot be determined even though that represents a legitimate location.
- Returns:
this
.- Since:
- 13.0
-
longitude
public Location.LocationBuilder longitude(Double longitude)
The longitude of the represented location.
Defaults to zero if it cannot be determined even though that represents a legitimate location.
- Returns:
this
.- Since:
- 13.0
-
metroCode
public Location.LocationBuilder metroCode(Integer metroCode)
The metro code of the represented location if it can be determined, otherwise zero.- Returns:
this
.- Since:
- 13.0
-
postalCode
public Location.LocationBuilder postalCode(String postalCode)
The postal code of the represented location if it can be determined, otherwise null.- Returns:
this
.- Since:
- 13.0
-
subdivisions
public Location.LocationBuilder subdivisions(List<Location.Subdivision> subdivisions)
The subdivisions of the location. This will generally hold the sate or province the location is in, however it depends on on the particular country. Some locations may have multiple subdivisions. The order is from the least specific to most specific division.- Returns:
this
.- Since:
- 15.24
-
build
public Location build()
-
-