calculate(long) method

Syntax

final BigDecimal calculate ( long amount )

Parameters

Returns

the calculated amount as BigDecimal

Usage

Calculates the sum for the specified 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