Interface Location
public interface Location
A geographical location representing a country and optionally a state within this country. A location can only be assigned to one Zone.
Example to create an instance using the builder pattern
Location location = Location.builder()
.country("{country}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocationBuilder
builder()
builder factory method for Locationstatic LocationBuilder
create builder for Location instancestatic Location
factory method to create a deep copy of Location@NotNull String
Country code of the geographic location.getState()
State within the country.static Location
of()
factory methodstatic Location
factory method to create a shallow copy Locationvoid
setCountry
(String country) Country code of the geographic location.void
State within the country.static com.fasterxml.jackson.core.type.TypeReference<Location>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withLocation
(Function<Location, T> helper) accessor map function
-
Method Details
-
getCountry
Country code of the geographic location.
- Returns:
- country
-
getState
String getState()State within the country.
- Returns:
- state
-
setCountry
Country code of the geographic location.
- Parameters:
country
- value to be set
-
setState
State within the country.
- Parameters:
state
- value to be set
-
of
factory method- Returns:
- instance of Location
-
of
factory method to create a shallow copy Location- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Location- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Location- Returns:
- builder
-
builder
create builder for Location instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withLocation
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-