Class AddProductSelectionChangeBuilder
java.lang.Object
com.commercetools.history.models.change.AddProductSelectionChangeBuilder
- All Implemented Interfaces:
Builder<AddProductSelectionChange>
public class AddProductSelectionChangeBuilder
extends Object
implements Builder<AddProductSelectionChange>
AddProductSelectionChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AddProductSelectionChange addProductSelectionChange = AddProductSelectionChange.builder()
.change("{change}")
.previousValue(previousValueBuilder -> previousValueBuilder)
.nextValue(nextValueBuilder -> nextValueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AddProductSelectionChange with checking for non-null required valuesbuilds AddProductSelectionChange without checking for non-null required valuesset the value to the changevalue of change}value of nextValue}value of previousValue}nextValue
(ProductSelectionSetting nextValue) set the value to the nextValueset the value to the nextValue using the builder functionof()
factory method for an instance of AddProductSelectionChangeBuilderof
(AddProductSelectionChange template) create builder for AddProductSelectionChange instancepreviousValue
(ProductSelectionSetting previousValue) set the value to the previousValueset the value to the previousValue using the builder functionset the value to the nextValue using the builder functionset the value to the previousValue using the builder function
-
Constructor Details
-
AddProductSelectionChangeBuilder
public AddProductSelectionChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- value to be set- Returns:
- Builder
-
previousValue
public AddProductSelectionChangeBuilder previousValue(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) set the value to the previousValue using the builder function- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public AddProductSelectionChangeBuilder withPreviousValue(Function<ProductSelectionSettingBuilder, ProductSelectionSetting> builder) set the value to the previousValue using the builder function- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
previousValue
set the value to the previousValue- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
nextValue
public AddProductSelectionChangeBuilder nextValue(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) set the value to the nextValue using the builder function- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public AddProductSelectionChangeBuilder withNextValue(Function<ProductSelectionSettingBuilder, ProductSelectionSetting> builder) set the value to the nextValue using the builder function- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
nextValue
set the value to the nextValue- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getPreviousValue
value of previousValue}- Returns:
- previousValue
-
getNextValue
value of nextValue}- Returns:
- nextValue
-
build
builds AddProductSelectionChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<AddProductSelectionChange>
- Returns:
- AddProductSelectionChange
-
buildUnchecked
builds AddProductSelectionChange without checking for non-null required values- Returns:
- AddProductSelectionChange
-
of
factory method for an instance of AddProductSelectionChangeBuilder- Returns:
- builder
-
of
create builder for AddProductSelectionChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-