List of utility methods to do BigDecimal Multiply
BigDecimal | multiply(BigDecimal left, BigDecimal right) multiply try { return left.multiply(right, MathContext.UNLIMITED); } catch (ArithmeticException ex) { return left.multiply(right, MathContext.DECIMAL128); |
BigDecimal | multiply(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; |
BigDecimal | multiply(BigDecimal num1, BigDecimal num2) multiply if (null == num1) { num1 = BigDecimal.ZERO; if (null == num2) { num2 = BigDecimal.ZERO; return num1.multiply(num2); |
BigDecimal | multiply(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); |
BigDecimal | multiply(BigDecimal number1, BigDecimal number2, int decimalPlaces) multiply return number1.multiply(number2, mathContext).setScale(decimalPlaces, roundingMode);
|
BigDecimal | multiply(BigDecimal one, BigDecimal another) multiply return one.multiply(another, _SCALE);
|
BigDecimal | multiply(BigDecimal op1, int op2) multiply return op1.multiply(new BigDecimal(op2)); |
BigDecimal | multiply(BigDecimal toBeMultiplied, int multiplyBy) multiply BigDecimal result = toBeMultiplied.multiply(new BigDecimal(multiplyBy)); return result; |
BigDecimal | multiply(BigDecimal v1, BigDecimal v2) multiply return v1.multiply(v2);
|
BigDecimal | multiply(BigDecimal value, Integer multiplier) multiply if (value == null || multiplier == null) { return ZERO_VALUE; return round(value.multiply(new BigDecimal(multiplier))); |