Proportional Allocator
class ProportionalAllocator(differenceAllocator: DifferenceAllocation) : Allocator<Ratios> , ProportionalAllocation(source)
Allocates a Money in ratios. Example:
val money = 100 money "USD"
val ratios = Ratios(75.percent(), 25.percent())
val allocator = ProportionalAllocator.default()
allocator.allocate(money, ratios).result() // [USD 75.00, USD 25.00]
Content copied to clipboard
Parameters
difference Allocator
Strategy to allocate the difference generated when allocating a Money amount.
Types
Link copied to clipboard
object Factory
A ProportionalAllocator factory.