Class LocationBuilder
java.lang.Object
com.commercetools.api.models.zone.LocationBuilder
LocationBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Location location = Location.builder()
.country("{country}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds Location with checking for non-null required valuesbuilds Location without checking for non-null required valuesCountry code of the geographic location.Country code of the geographic location.getState()
State within the country.static LocationBuilder
of()
factory method for an instance of LocationBuilderstatic LocationBuilder
create builder for Location instanceState within the country.
-
Constructor Details
-
LocationBuilder
public LocationBuilder()
-
-
Method Details
-
country
Country code of the geographic location.
- Parameters:
country
- value to be set- Returns:
- Builder
-
state
State within the country.
- Parameters:
state
- value to be set- Returns:
- Builder
-
getCountry
Country code of the geographic location.
- Returns:
- country
-
getState
State within the country.
- Returns:
- state
-
build
builds Location with checking for non-null required values -
buildUnchecked
builds Location without checking for non-null required values- Returns:
- Location
-
of
factory method for an instance of LocationBuilder- Returns:
- builder
-
of
create builder for Location instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-