Package-level declarations
Allocation features for Money.
Types
Link copied to clipboard
Defines the Money allocation interface.
Link copied to clipboard
Defines the allocation parameter types.
Link copied to clipboard
Base class for Allocation implementations. This class implements the Template Method pattern. Subclasses need to override the following members:
Link copied to clipboard
Allocates a Money amount in even parts.
Link copied to clipboard
class EvenAllocator(differenceAllocator: DifferenceAllocation) : Allocator<EvenParts> , EvenAllocation
Allocates a Money in equal parts. Example:
Link copied to clipboard
Parameter type for even allocation.
Link copied to clipboard
Allocates a Money in ratios.
Link copied to clipboard
class ProportionalAllocator(differenceAllocator: DifferenceAllocation) : Allocator<Ratios> , ProportionalAllocation
Allocates a Money in ratios. Example:
Link copied to clipboard
Parameter type for proportional allocation.
Functions
Link copied to clipboard
Adjust a list of Percentage to sum up to 100% if the difference is within the given tolerance. Useful when working with a list of Percentage calculated using floating-point arithmetic.