Class ProductDiscountValueAbsoluteBuilder
- All Implemented Interfaces:
Builder<ProductDiscountValueAbsolute>
Example to create an instance using the builder pattern
ProductDiscountValueAbsolute productDiscountValueAbsolute = ProductDiscountValueAbsolute.builder()
.plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMoney values in different currencies.build()builds ProductDiscountValueAbsolute with checking for non-null required valuesbuilds ProductDiscountValueAbsolute without checking for non-null required valuesgetMoney()Money values in different currencies.money(CentPrecisionMoney... money) Money values in different currencies.money(List<CentPrecisionMoney> money) Money values in different currencies.of()factory method for an instance of ProductDiscountValueAbsoluteBuilderof(ProductDiscountValueAbsolute template) create builder for ProductDiscountValueAbsolute instanceplusMoney(CentPrecisionMoney... money) Money values in different currencies.Money values in different currencies.Money values in different currencies.Money values in different currencies.
-
Constructor Details
-
ProductDiscountValueAbsoluteBuilder
public ProductDiscountValueAbsoluteBuilder()
-
-
Method Details
-
money
Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
money- value to be set- Returns:
- Builder
-
money
Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
money- value to be set- Returns:
- Builder
-
plusMoney
Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
money- value to be set- Returns:
- Builder
-
plusMoney
public ProductDiscountValueAbsoluteBuilder plusMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
builder- function to build the money value- Returns:
- Builder
-
withMoney
public ProductDiscountValueAbsoluteBuilder withMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
builder- function to build the money value- Returns:
- Builder
-
addMoney
public ProductDiscountValueAbsoluteBuilder addMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
builder- function to build the money value- Returns:
- Builder
-
setMoney
public ProductDiscountValueAbsoluteBuilder setMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
builder- function to build the money value- Returns:
- Builder
-
getMoney
Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Returns:
- money
-
build
builds ProductDiscountValueAbsolute with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductDiscountValueAbsolute>- Returns:
- ProductDiscountValueAbsolute
-
buildUnchecked
builds ProductDiscountValueAbsolute without checking for non-null required values- Returns:
- ProductDiscountValueAbsolute
-
of
factory method for an instance of ProductDiscountValueAbsoluteBuilder- Returns:
- builder
-
of
create builder for ProductDiscountValueAbsolute instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-