Class GeoLocationBuilder
java.lang.Object
com.commercetools.history.models.common.GeoLocationBuilder
- All Implemented Interfaces:
Builder<GeoLocation>
GeoLocationBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
GeoLocation geoLocation = GeoLocation.builder()
.type("{type}")
.plusCoordinates(coordinatesBuilder -> coordinatesBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds GeoLocation with checking for non-null required valuesbuilds GeoLocation without checking for non-null required valuescoordinates(Integer... coordinates) set values to the coordinatescoordinates(List<Integer> coordinates) set value to the coordinatesvalue of coordinates}getType()value of type}static GeoLocationBuilderof()factory method for an instance of GeoLocationBuilderstatic GeoLocationBuilderof(GeoLocation template) create builder for GeoLocation instanceplusCoordinates(Integer... coordinates) add values to the coordinatesset the value to the type
-
Constructor Details
-
GeoLocationBuilder
public GeoLocationBuilder()
-
-
Method Details
-
type
set the value to the type- Parameters:
type- value to be set- Returns:
- Builder
-
coordinates
set values to the coordinates- Parameters:
coordinates- value to be set- Returns:
- Builder
-
coordinates
set value to the coordinates- Parameters:
coordinates- value to be set- Returns:
- Builder
-
plusCoordinates
add values to the coordinates- Parameters:
coordinates- value to be set- Returns:
- Builder
-
getType
value of type}- Returns:
- type
-
getCoordinates
value of coordinates}- Returns:
- coordinates
-
build
builds GeoLocation with checking for non-null required values- Specified by:
buildin interfaceBuilder<GeoLocation>- Returns:
- GeoLocation
-
buildUnchecked
builds GeoLocation without checking for non-null required values- Returns:
- GeoLocation
-
of
factory method for an instance of GeoLocationBuilder- Returns:
- builder
-
of
create builder for GeoLocation instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-