NegativeOnGreatest

Allocates a negative Money difference on the first item with the greatest value in the allocations list. Otherwise, distributes the difference on the last item with the smallest value in the allocations list.

Properties

Link copied to clipboard

The DifferenceAllocation instance to allocate a negative difference value.

Link copied to clipboard

The DifferenceAllocation instance to allocate a positive difference value.

Functions

Link copied to clipboard
open override fun allocate(difference: Money, allocations: List<Money>): List<Money>

Allocates the difference in the allocations list.