Class ProductLabelBuilder
java.lang.Object
com.commercetools.history.models.label.ProductLabelBuilder
- All Implemented Interfaces:
Builder<ProductLabel>
ProductLabelBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductLabel productLabel = ProductLabel.builder()
.slug(slugBuilder -> slugBuilder)
.name(nameBuilder -> nameBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductLabel with checking for non-null required valuesbuilds ProductLabel without checking for non-null required valuesgetName()
Name of the Product.getSlug()
User-defined identifier used in a deep-link URL for the Product.name
(LocalizedString name) Name of the Product.Name of the Product.static ProductLabelBuilder
of()
factory method for an instance of ProductLabelBuilderstatic ProductLabelBuilder
of
(ProductLabel template) create builder for ProductLabel instanceslug
(LocalizedString slug) User-defined identifier used in a deep-link URL for the Product.User-defined identifier used in a deep-link URL for the Product.Name of the Product.User-defined identifier used in a deep-link URL for the Product.
-
Constructor Details
-
ProductLabelBuilder
public ProductLabelBuilder()
-
-
Method Details
-
slug
User-defined identifier used in a deep-link URL for the Product.
- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
withSlug
User-defined identifier used in a deep-link URL for the Product.
- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
slug
User-defined identifier used in a deep-link URL for the Product.
- Parameters:
slug
- value to be set- Returns:
- Builder
-
name
Name of the Product.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the Product.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the Product.
- Parameters:
name
- value to be set- Returns:
- Builder
-
getSlug
User-defined identifier used in a deep-link URL for the Product.
- Returns:
- slug
-
getName
Name of the Product.
- Returns:
- name
-
build
builds ProductLabel with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductLabel>
- Returns:
- ProductLabel
-
buildUnchecked
builds ProductLabel without checking for non-null required values- Returns:
- ProductLabel
-
of
factory method for an instance of ProductLabelBuilder- Returns:
- builder
-
of
create builder for ProductLabel instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-