Class LocationBuilder
java.lang.Object
com.commercetools.history.models.common.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}")
.state("{state}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds Location with checking for non-null required valuesbuilds Location without checking for non-null required valuesTwo-digit country code as per ISO 3166-1 alpha-2.Two-digit country code as per ISO 3166-1 alpha-2.getState()
value of state}static LocationBuilder
of()
factory method for an instance of LocationBuilderstatic LocationBuilder
create builder for Location instanceset the value to the state
-
Constructor Details
-
LocationBuilder
public LocationBuilder()
-
-
Method Details
-
country
Two-digit country code as per ISO 3166-1 alpha-2.
- Parameters:
country
- value to be set- Returns:
- Builder
-
state
set the value to the state- Parameters:
state
- value to be set- Returns:
- Builder
-
getCountry
Two-digit country code as per ISO 3166-1 alpha-2.
- Returns:
- country
-
getState
value of state}- 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
-