Class CountOnCustomLineItemUnitsBuilder
- All Implemented Interfaces:
Builder<CountOnCustomLineItemUnits>
Example to create an instance using the builder pattern
CountOnCustomLineItemUnits countOnCustomLineItemUnits = CountOnCustomLineItemUnits.builder()
.predicate("{predicate}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CountOnCustomLineItemUnits with checking for non-null required valuesbuilds CountOnCustomLineItemUnits without checking for non-null required valuesexcludeCount
(Integer excludeCount) Number of units of a Custom Line Item to exclude on every application of the Discount.Number of units of a Custom Line Item to exclude on every application of the Discount.Maximum number of units of a Custom Line Item that match the predicate.Minimum number of units of a Custom Line Item that match the predicate.Valid CustomLineItem predicate that determines the units participating in the Discount.Maximum number of units of a Custom Line Item that match the predicate.Minimum number of units of a Custom Line Item that match the predicate.of()
factory method for an instance of CountOnCustomLineItemUnitsBuilderof
(CountOnCustomLineItemUnits template) create builder for CountOnCustomLineItemUnits instanceValid CustomLineItem predicate that determines the units participating in the Discount.
-
Constructor Details
-
CountOnCustomLineItemUnitsBuilder
public CountOnCustomLineItemUnitsBuilder()
-
-
Method Details
-
predicate
Valid CustomLineItem predicate that determines the units participating in the Discount.
- Parameters:
predicate
- value to be set- Returns:
- Builder
-
minCount
Minimum number of units of a Custom Line Item that match the predicate.
- Parameters:
minCount
- value to be set- Returns:
- Builder
-
maxCount
Maximum number of units of a Custom Line Item that match the predicate. There might be more units matching the predicate, but they will not be participating to the resulting set.
The value must be greater than or equal to
minCount
. If not provided, the component will match all units that satisfy the predicate.- Parameters:
maxCount
- value to be set- Returns:
- Builder
-
excludeCount
Number of units of a Custom Line Item to exclude on every application of the Discount.
Set only when configuring the
targetPattern
.The units matched first (satisfying the pattern component) will be excluded from the resulting set. The
minCount
andmaxCount
are considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. For example, if 5 jeans are required but only 3 should be discounted, theexcludeCount
value must be 2.- Parameters:
excludeCount
- value to be set- Returns:
- Builder
-
getPredicate
Valid CustomLineItem predicate that determines the units participating in the Discount.
- Returns:
- predicate
-
getMinCount
Minimum number of units of a Custom Line Item that match the predicate.
- Returns:
- minCount
-
getMaxCount
Maximum number of units of a Custom Line Item that match the predicate. There might be more units matching the predicate, but they will not be participating to the resulting set.
The value must be greater than or equal to
minCount
. If not provided, the component will match all units that satisfy the predicate.- Returns:
- maxCount
-
getExcludeCount
Number of units of a Custom Line Item to exclude on every application of the Discount.
Set only when configuring the
targetPattern
.The units matched first (satisfying the pattern component) will be excluded from the resulting set. The
minCount
andmaxCount
are considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. For example, if 5 jeans are required but only 3 should be discounted, theexcludeCount
value must be 2.- Returns:
- excludeCount
-
build
builds CountOnCustomLineItemUnits with checking for non-null required values- Specified by:
build
in interfaceBuilder<CountOnCustomLineItemUnits>
- Returns:
- CountOnCustomLineItemUnits
-
buildUnchecked
builds CountOnCustomLineItemUnits without checking for non-null required values- Returns:
- CountOnCustomLineItemUnits
-
of
factory method for an instance of CountOnCustomLineItemUnitsBuilder- Returns:
- builder
-
of
create builder for CountOnCustomLineItemUnits instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-