Interface ProductDiscountValue
- All Known Subinterfaces:
ProductDiscountValueAbsolute
,ProductDiscountValueExternal
,ProductDiscountValueRelative
- All Known Implementing Classes:
ProductDiscountValueAbsoluteImpl
,ProductDiscountValueExternalImpl
,ProductDiscountValueImpl
,ProductDiscountValueRelativeImpl
public interface ProductDiscountValue
ProductDiscountValue
Example to create a subtype instance using the builder pattern
Example to create a subtype instance using the builder pattern
ProductDiscountValue productDiscountValue = ProductDiscountValue.absoluteBuilder()
plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for absolute subtypestatic ProductDiscountValue
deepCopy
(ProductDiscountValue template) factory method to create a deep copy of ProductDiscountValuebuilder for external subtype@NotNull String
getType()
builder for relative subtypestatic com.fasterxml.jackson.core.type.TypeReference<ProductDiscountValue>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductDiscountValue
(Function<ProductDiscountValue, T> helper) accessor map function
-
Method Details
-
getType
- Returns:
- type
-
deepCopy
factory method to create a deep copy of ProductDiscountValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
absoluteBuilder
builder for absolute subtype- Returns:
- builder
-
externalBuilder
builder for external subtype- Returns:
- builder
-
relativeBuilder
builder for relative subtype- Returns:
- builder
-
withProductDiscountValue
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-