DistributableAllocation
Allocates the Money difference by distributing every unit of it according to allocator. For example, a difference of USD 0.03 will be allocated by distributing USD 0.01 three times.
This interface implements the Template Method pattern. Subclasses need to override the method distribute, which will receive a list of Money representing the difference units and use the allocator to distribute them. A difference unit is always equal to the smallest possible value for a Money in a given Currency, examples:
A difference of
USD 0.03yields a list with three items with theUSD 0.01valueA difference of
JPY 2yields a list with two items with theJPY 1value
Inheritors
Properties
The DifferenceAllocation instance to allocate the difference units.
Functions
Allocates the difference in the allocations list.
Distributes the difference units in the allocations list.