List of utility methods to do BigDecimal Compare
int | compareToZeroOrNull(BigDecimal value) compare To Zero Or Null if (value == null) return 0; else return compareToZero(value); |
boolean | greaterThan(BigDecimal decimal, double number) greater Than return greaterThan(decimal, new BigDecimal(number)); |
boolean | GreaterThan(BigDecimal one, BigDecimal two) Returns true if one > two return (one.compareTo(two) > 0);
|
boolean | greaterThan(BigDecimal val, double threshold) greater Than requireNonNull(val); return val.compareTo(BigDecimal.valueOf(threshold)) > 0; |
boolean | GreaterThanOrEqual(BigDecimal one, BigDecimal two) Greater Than Or Equal if (!Equals(one, two)) { return GreaterThan(one, two); return true; |
Boolean | greaterThanZero(BigDecimal d) greater Than Zero return d.compareTo(BigDecimal.ZERO) > 0;
|
boolean | greaterThanZero(BigDecimal is) greater Than Zero return is != null && is.compareTo(BigDecimal.ZERO) > 0;
|
boolean | isGreater(BigDecimal a, BigDecimal b) is Greater return a.compareTo(b) > 0;
|
boolean | isGreaterThanOne(@Nonnull final BigDecimal aValue) is Greater Than One return aValue.compareTo(BigDecimal.ONE) > 0;
|
boolean | lessThan(BigDecimal val1, BigDecimal val2) less Than int compareValue = val1.compareTo(val2); return (compareValue < 0); |