n
Size: a a a
n
n
n
D
DB
PE
n
S
PE
АГ
S
АГ
NK
/**
* Returns a {@code BigDecimal} whose scale is the specified
* value, and whose unscaled value is determined by multiplying or
* dividing this {@code BigDecimal}'s unscaled value by the
* appropriate power of ten to maintain its overall value. If the
* scale is reduced by the operation, the unscaled value must be
* divided (rather than multiplied), and the value may be changed;
* in this case, the specified rounding mode is applied to the
* division.
*
* @param roundingOff the rounding number
* @param scale scale of the {@code BigDecimal} value to be returned
* @return a rounded number
* @apiNote uses a rounding mode {@code RoundingMode=HALF_UP}
*/
private static BigDecimal round(BigDecimal roundingOff, int scale) {
return roundingOff != null ?
roundingOff.setScale(scale, RoundingMode.HALF_UP)
: null;
}
Р
Р
K
ME
K
K
ME