Class PatternComponentBuilder
java.lang.Object
com.commercetools.history.models.cart_discount.PatternComponentBuilder
- All Implemented Interfaces:
Builder<PatternComponent>
PatternComponentBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
PatternComponent patternComponent = PatternComponent.builder()
.type("{type}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds PatternComponent with checking for non-null required valuesbuilds PatternComponent without checking for non-null required valuesgetType()
value of type}static PatternComponentBuilder
of()
factory method for an instance of PatternComponentBuilderstatic PatternComponentBuilder
of
(PatternComponent template) create builder for PatternComponent instanceset the value to the type
-
Constructor Details
-
PatternComponentBuilder
public PatternComponentBuilder()
-
-
Method Details
-
type
set the value to the type- Parameters:
type
- value to be set- Returns:
- Builder
-
getType
value of type}- Returns:
- type
-
build
builds PatternComponent with checking for non-null required values- Specified by:
build
in interfaceBuilder<PatternComponent>
- Returns:
- PatternComponent
-
buildUnchecked
builds PatternComponent without checking for non-null required values- Returns:
- PatternComponent
-
of
factory method for an instance of PatternComponentBuilder- Returns:
- builder
-
of
create builder for PatternComponent instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-