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 LocationBuilderbuilder()builder factory method for Locationstatic LocationBuildercreate builder for Location instancecopyDeep()static Locationfactory method to create a deep copy of Location@NotNull StringTwo-digit country code as per ISO 3166-1 alpha-2.@NotNull StringgetState()static Locationof()factory methodstatic Locationfactory method to create a shallow copy LocationvoidsetCountry(String country) Two-digit country code as per ISO 3166-1 alpha-2.voidset statestatic com.fasterxml.jackson.core.type.TypeReference<Location>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithLocation(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
-
copyDeep
Location copyDeep() -
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
-