DistributeBySign

Allocates the Money difference according to its sign by distributing its difference units.

Parameters

positiveAllocator

The DifferenceAllocation instance to distribute a positive difference value units.

negativeAllocator

The DifferenceAllocation instance to distribute a negative difference value units.

Constructors

Link copied to clipboard
constructor(positiveAllocator: DifferenceAllocation, negativeAllocator: DifferenceAllocation)

Types

Link copied to clipboard
object Factory

A DistributeBySign factory.

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.