List of utility methods to do BigDecimal Subtract
BigDecimal | subtract(BigDecimal minuend, BigDecimal subtrahend) Subtracts one decimal from another returning the result. BigDecimal result = null; if (minuend != null && subtrahend != null) { result = minuend.subtract(subtrahend); return result; |
BigDecimal | subtract(BigDecimal num1, BigDecimal num2) subtract if (null == num1 || null == num2) { return ZERO; BigDecimal temp = num1.subtract(num2); return temp.setScale(STANDARD_SCALE, STANDARD_ROUND_HALF); |
BigDecimal | subtract(BigDecimal number1, BigDecimal number2, int decimalPlaces) subtract return number1.subtract(number2, mathContext).setScale(decimalPlaces, roundingMode);
|
BigDecimal | subtract(BigDecimal one, BigDecimal another) subtract return one.subtract(another);
|
BigDecimal | subtract(BigDecimal v1, BigDecimal v2) subtract return v1.subtract(v2);
|
BigDecimal | subtract(final BigDecimal baseAmount, final BigDecimal amountToSubtract) Subtract one amount from another rounding to two decimal places. return rounded(baseAmount).subtract(rounded(amountToSubtract));
|
BigDecimal | subtract(final BigDecimal start, final BigDecimal... values) Subtract n BigDecimal safely (i.e. BigDecimal total = start != null ? start : BigDecimal.ZERO; if (values != null) { for (final BigDecimal v : values) { total = doSubtract(total, v); return total; |
BigDecimal | subtract(float a, BigDecimal b_bd) Convert the float parameter into BigDecimal , subtract and return BigDecimal
BigDecimal a_bd = new BigDecimal(Float.toString(a)); return a_bd.subtract(b_bd); |
Vector | subtract(Vector subtract int m = a.size(); Vector<BigDecimal> c = new Vector(m); for (int i = 0; i < m; i++) { BigDecimal value = ((BigDecimal) a.elementAt(i)).subtract((BigDecimal) b.elementAt(i)); c.add(value); return c; |
BigDecimal | subtract2Abs(BigDecimal aValue1, BigDecimal aValue2) subtract Abs if (aValue1 == null || aValue2 == null) return null; return aValue1.subtract(aValue2).abs(); |