Interface TaxPortion
public interface TaxPortion
TaxPortion
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxPortion taxPortion = TaxPortion.builder()
.rate(0.3)
.amount(amountBuilder -> amountBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaxPortionBuilderbuilder()builder factory method for TaxPortionstatic TaxPortionBuilderbuilder(TaxPortion template) create builder for TaxPortion instancecopyDeep()static TaxPortiondeepCopy(TaxPortion template) factory method to create a deep copy of TaxPortion@NotNull @Valid TypedMoneyMoney value of the tax portion.getName()Name of the tax portion.@NotNull DoublegetRate()A number in the range 0-1.static TaxPortionof()factory methodstatic TaxPortionof(TaxPortion template) factory method to create a shallow copy TaxPortionvoidsetAmount(TypedMoney amount) Money value of the tax portion.voidName of the tax portion.voidA number in the range 0-1.static com.fasterxml.jackson.core.type.TypeReference<TaxPortion>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithTaxPortion(Function<TaxPortion, T> helper) accessor map function
-
Method Details
-
getName
String getName()Name of the tax portion.
- Returns:
- name
-
getRate
A number in the range 0-1.
- Returns:
- rate
-
getAmount
Money value of the tax portion.
- Returns:
- amount
-
setName
Name of the tax portion.
- Parameters:
name- value to be set
-
setRate
A number in the range 0-1.
- Parameters:
rate- value to be set
-
setAmount
Money value of the tax portion.
- Parameters:
amount- value to be set
-
of
factory method- Returns:
- instance of TaxPortion
-
of
factory method to create a shallow copy TaxPortion- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
TaxPortion copyDeep() -
deepCopy
factory method to create a deep copy of TaxPortion- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TaxPortion- Returns:
- builder
-
builder
create builder for TaxPortion instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withTaxPortion
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
-