Interface AllocationDraft
- All Known Subinterfaces:
AbsoluteAllocationDraft,RelativeAllocationDraft
public interface AllocationDraft
Draft type that stores the share of the Order total that a PaymentAllocationDraft covers.
Example to create a subtype instance using the builder pattern
AllocationDraft allocationDraft = AllocationDraft.absoluteBuilder()
amount(amountBuilder -> amountBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for absolute subtypecopyDeep()static AllocationDraftdeepCopy(AllocationDraft template) factory method to create a deep copy of AllocationDraft@NotNull StringgetType()Type of the Allocation.builder for relative subtypestatic tools.jackson.core.type.TypeReference<AllocationDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithAllocationDraft(Function<AllocationDraft, T> helper) accessor map function
-
Method Details
-
getType
Type of the Allocation.
- Returns:
- type
-
copyDeep
AllocationDraft copyDeep() -
deepCopy
factory method to create a deep copy of AllocationDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
absoluteBuilder
builder for absolute subtype- Returns:
- builder
-
relativeBuilder
builder for relative subtype- Returns:
- builder
-
withAllocationDraft
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
-