Class MoneyFieldBuilder
java.lang.Object
com.commercetools.importapi.models.customfields.MoneyFieldBuilder
- All Implemented Interfaces:
Builder<MoneyField>
MoneyFieldBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MoneyField moneyField = MoneyField.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MoneyField with checking for non-null required valuesbuilds MoneyField without checking for non-null required valuesgetValue()
value of value}static MoneyFieldBuilder
of()
factory method for an instance of MoneyFieldBuilderstatic MoneyFieldBuilder
of
(MoneyField template) create builder for MoneyField instancevalue
(TypedMoney value) set the value to the valuevalue
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) set the value to the value using the builder function
-
Constructor Details
-
MoneyFieldBuilder
public MoneyFieldBuilder()
-
-
Method Details
-
value
set the value to the value- Parameters:
value
- value to be set- Returns:
- Builder
-
value
set the value to the value using the builder function- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
getValue
value of value}- Returns:
- value
-
build
builds MoneyField with checking for non-null required values- Specified by:
build
in interfaceBuilder<MoneyField>
- Returns:
- MoneyField
-
buildUnchecked
builds MoneyField without checking for non-null required values- Returns:
- MoneyField
-
of
factory method for an instance of MoneyFieldBuilder- Returns:
- builder
-
of
create builder for MoneyField instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-