Interface Allocation
- All Known Subinterfaces:
AbsoluteAllocation,RelativeAllocation
public interface Allocation
Share of the Order total that a RecurringPaymentAllocation covers.
Example to create a subtype instance using the builder pattern
Allocation allocation = Allocation.absoluteBuilder()
amount(amountBuilder -> amountBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AbsoluteAllocationBuilderbuilder for absolute subtypecopyDeep()static AllocationdeepCopy(Allocation template) factory method to create a deep copy of Allocation@NotNull StringgetType()Type of the Allocation.static RelativeAllocationBuilderbuilder for relative subtypestatic tools.jackson.core.type.TypeReference<Allocation>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithAllocation(Function<Allocation, T> helper) accessor map function
-
Method Details
-
getType
Type of the Allocation.
- Returns:
- type
-
copyDeep
Allocation copyDeep() -
deepCopy
factory method to create a deep copy of Allocation- Parameters:
template- instance to be copied- Returns:
- copy instance
-
absoluteBuilder
builder for absolute subtype- Returns:
- builder
-
relativeBuilder
builder for relative subtype- Returns:
- builder
-
withAllocation
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
-