Interface Location
public interface Location
Shape of the value for addLocation
and removeLocation
actions
Example to create an instance using the builder pattern
Location location = Location.builder()
.country("{country}")
.state("{state}")
.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
Two-digit country code as per ISO 3166-1 alpha-2.@NotNull String
getState()
static Location
of()
factory methodstatic Location
factory method to create a shallow copy Locationvoid
setCountry
(String country) Two-digit country code as per ISO 3166-1 alpha-2.void
set statestatic 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
Two-digit country code as per ISO 3166-1 alpha-2.
- Returns:
- country
-
getState
- Returns:
- state
-
setCountry
Two-digit country code as per ISO 3166-1 alpha-2.
- Parameters:
country
- value to be set
-
setState
set state- 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
-