Even Allocator
class EvenAllocator(differenceAllocator: DifferenceAllocation) : Allocator<EvenParts> , EvenAllocation(source)
Allocates a Money in equal parts. Example:
val money = 100 money "USD"
val allocator = EvenAllocator.default()
allocator.allocate(money, 3).result() // [USD 33.34, USD 33.33, USD 33.33]
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 EvenAllocator factory.