Java Utililty Methods BigDecimal Multiply

List of utility methods to do BigDecimal Multiply

Description

The list of methods to do BigDecimal Multiply are organized into topic(s).

Method

BigDecimalmultiply(BigDecimal left, BigDecimal right)
multiply
try {
    return left.multiply(right, MathContext.UNLIMITED);
} catch (ArithmeticException ex) {
    return left.multiply(right, MathContext.DECIMAL128);
BigDecimalmultiply(BigDecimal multiplier1, BigDecimal multiplier2, int scale)
Multiplies two decimals and applies the given scale and a ROUND_HALF_UP.
BigDecimal result = BigDecimal.ZERO;
if (multiplier1 != null && multiplier2 != null) {
    result = multiplier1.multiply(multiplier2);
result = result.setScale(scale, BigDecimal.ROUND_HALF_UP);
return result;
BigDecimalmultiply(BigDecimal num1, BigDecimal num2)
multiply
if (null == num1) {
    num1 = BigDecimal.ZERO;
if (null == num2) {
    num2 = BigDecimal.ZERO;
return num1.multiply(num2);
BigDecimalmultiply(BigDecimal num1, BigDecimal num2)
multiply
if (null == num1 || null == num2) {
    return ZERO;
BigDecimal temp = num1.multiply(num2);
return temp.setScale(STANDARD_SCALE, STANDARD_ROUND_HALF);
BigDecimalmultiply(BigDecimal number1, BigDecimal number2, int decimalPlaces)
multiply
return number1.multiply(number2, mathContext).setScale(decimalPlaces, roundingMode);
BigDecimalmultiply(BigDecimal one, BigDecimal another)
multiply
return one.multiply(another, _SCALE);
BigDecimalmultiply(BigDecimal op1, int op2)
multiply
return op1.multiply(new BigDecimal(op2));
BigDecimalmultiply(BigDecimal toBeMultiplied, int multiplyBy)
multiply
BigDecimal result = toBeMultiplied.multiply(new BigDecimal(multiplyBy));
return result;
BigDecimalmultiply(BigDecimal v1, BigDecimal v2)
multiply
return v1.multiply(v2);
BigDecimalmultiply(BigDecimal value, Integer multiplier)
multiply
if (value == null || multiplier == null) {
    return ZERO_VALUE;
return round(value.multiply(new BigDecimal(multiplier)));