Class ProductVariantSelectionBuilder
java.lang.Object
com.commercetools.history.models.common.ProductVariantSelectionBuilder
- All Implemented Interfaces:
Builder<ProductVariantSelection>
public class ProductVariantSelectionBuilder
extends Object
implements Builder<ProductVariantSelection>
ProductVariantSelectionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductVariantSelection productVariantSelection = ProductVariantSelection.builder()
.type(ProductVariantSelectionTypeEnum.INCLUSION)
.plusSkus(skusBuilder -> skusBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ProductVariantSelection with checking for non-null required valuesbuilds ProductVariantSelection without checking for non-null required valuesgetSkus()value of skus}getType()value of type}of()factory method for an instance of ProductVariantSelectionBuilderof(ProductVariantSelection template) create builder for ProductVariantSelection instanceadd values to the skusset values to the skusset value to the skusset the value to the type
-
Constructor Details
-
ProductVariantSelectionBuilder
public ProductVariantSelectionBuilder()
-
-
Method Details
-
type
set the value to the type- Parameters:
type- value to be set- Returns:
- Builder
-
skus
set values to the skus- Parameters:
skus- value to be set- Returns:
- Builder
-
skus
set value to the skus- Parameters:
skus- value to be set- Returns:
- Builder
-
plusSkus
add values to the skus- Parameters:
skus- value to be set- Returns:
- Builder
-
getType
value of type}- Returns:
- type
-
getSkus
value of skus}- Returns:
- skus
-
build
builds ProductVariantSelection with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductVariantSelection>- Returns:
- ProductVariantSelection
-
buildUnchecked
builds ProductVariantSelection without checking for non-null required values- Returns:
- ProductVariantSelection
-
of
factory method for an instance of ProductVariantSelectionBuilder- Returns:
- builder
-
of
create builder for ProductVariantSelection instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-