List of utility methods to do BigDecimal Equal
boolean | equals(final BigDecimal pValue1, final BigDecimal pValue2) Check to see if the big decimals are equal (null safe). if (pValue1 == null || pValue2 == null) return false; return pValue1.equals(pValue2); |
boolean | equalsBigDecimal(BigDecimal bd1, BigDecimal bd2) equals Big Decimal if (bd1.compareTo(bd2) == 0) { return true; } else { return false; |
boolean | isEqual(BigDecimal aLhs, BigDecimal aRhs) FILLIN return ((aLhs == null && aRhs == null) || (aLhs != null && aRhs != null && aLhs.compareTo(aRhs) == 0));
|
boolean | isEqual(BigDecimal n1, BigDecimal n2, int precision) Checks two BigDecimal with given precision - number of nulls after point. BigDecimal alpha = BigDecimal.ONE.movePointLeft(precision);
return n1.subtract(n2).abs().compareTo(alpha) <= 0;
|
boolean | isEqual(BigDecimal value1, BigDecimal value2) Compares this value1 to value2. return value1.compareTo(value2) == 0;
|
boolean | isEqual(final BigDecimal value1, final BigDecimal value2) Compares two given BigDecimals. if (value1 == null) { return (value2 == null) ? true : false; if (value2 == null) { return false; return value1.compareTo(value2) == 0; |
boolean | isEqualsToZero(BigDecimal value) is Equals To Zero return value.compareTo(BigDecimal.ZERO) == 0;
|