Interface TaxedPrice
public interface TaxedPrice
TaxedPrice
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxedPrice taxedPrice = TaxedPrice.builder()
.totalNet(totalNetBuilder -> totalNetBuilder)
.totalGross(totalGrossBuilder -> totalGrossBuilder)
.plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaxedPriceBuilder
builder()
builder factory method for TaxedPricestatic TaxedPriceBuilder
builder
(TaxedPrice template) create builder for TaxedPrice instancestatic TaxedPrice
deepCopy
(TaxedPrice template) factory method to create a deep copy of TaxedPrice@NotNull @Valid List<TaxPortion>
Maps toTaxedPrice.taxPortions
.@NotNull @Valid Money
Maps toTaxedPrice.totalGross
.@NotNull @Valid Money
Maps toTaxedPrice.totalNet
.static TaxedPrice
of()
factory methodstatic TaxedPrice
of
(TaxedPrice template) factory method to create a shallow copy TaxedPricevoid
setTaxPortions
(TaxPortion... taxPortions) Maps toTaxedPrice.taxPortions
.void
setTaxPortions
(List<TaxPortion> taxPortions) Maps toTaxedPrice.taxPortions
.void
setTotalGross
(Money totalGross) Maps toTaxedPrice.totalGross
.void
setTotalNet
(Money totalNet) Maps toTaxedPrice.totalNet
.static com.fasterxml.jackson.core.type.TypeReference<TaxedPrice>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withTaxedPrice
(Function<TaxedPrice, T> helper) accessor map function
-
Method Details
-
getTotalNet
Maps to
TaxedPrice.totalNet
.- Returns:
- totalNet
-
getTotalGross
Maps to
TaxedPrice.totalGross
.- Returns:
- totalGross
-
getTaxPortions
Maps to
TaxedPrice.taxPortions
.- Returns:
- taxPortions
-
setTotalNet
Maps to
TaxedPrice.totalNet
.- Parameters:
totalNet
- value to be set
-
setTotalGross
Maps to
TaxedPrice.totalGross
.- Parameters:
totalGross
- value to be set
-
setTaxPortions
Maps to
TaxedPrice.taxPortions
.- Parameters:
taxPortions
- values to be set
-
setTaxPortions
Maps to
TaxedPrice.taxPortions
.- Parameters:
taxPortions
- values to be set
-
of
factory method- Returns:
- instance of TaxedPrice
-
of
factory method to create a shallow copy TaxedPrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of TaxedPrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TaxedPrice- Returns:
- builder
-
builder
create builder for TaxedPrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withTaxedPrice
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
-