calculate(Step, long) method

Syntax

final BigDecimal calculate ( Step step , long amount )

Parameters

Returns

the calculated amount as BigDecimal

Usage

Calculates the sum for the specified (scale) step and amount.

This method returns the result of

max(minAmount, min(maxAmount, onTopAmount + amount * percentage / 100))

; given that a

maxAmount

is set. If there is no such max value, the

min()

operation is omitted.

the calculated amount as BigDecimal