List of utility methods to do BigDecimal Min
BigDecimal | min(BigDecimal a, BigDecimal b) Returns the minimum value between the two. if (a == null) return b; if (b == null) return a; return a.min(b); |
BigDecimal | min(BigDecimal b1, BigDecimal b2) Return min value of @param b1 and @param b2 if (b1 == null && b2 == null) { return null; if (b1 == null) { b1 = ZERO; if (b2 == null) { b2 = ZERO; ... |
BigDecimal | min(BigDecimal one, BigDecimal other) min return (one.compareTo(other) < 0 ? one : other);
|
BigDecimal | min(BigDecimal... amounts) min BigDecimal result = null; for (BigDecimal bigDecimal : amounts) { if (bigDecimal != null) { result = result == null ? bigDecimal : result.min(bigDecimal); return result; |
BigDecimal | min(final BigDecimal bd1, final BigDecimal bd2) Selects the lower of two BigDecimals, preferring the non-null value if one is null. if (bd1 == null) { return bd2; if (bd2 == null) { return bd1; if (bd1.compareTo(bd2) < 0) { return bd1; ... |
BigDecimal | min(final BigDecimal v1, final BigDecimal v2) min if (v1 == null) { return v2; } else if (v2 == null) { return v1; return v1.compareTo(v2) <= 0 ? v1 : v2; |
BigDecimal | min(List Returns the min number in the numbers list. return new TreeSet<BigDecimal>(numbers).first(); |
BigDecimal | minimum(BigDecimal... decimals) Returns the smallest of the given list of decimal numbers. BigDecimal result = null; if (decimals != null) { for (BigDecimal decimal : decimals) { if (decimal != null) { if (result == null) { result = decimal; } else { result = result.min(decimal); ... |
BigDecimal | minimum(BigDecimal... values) Calculate the minimum value from an array of values. int len = values.length; if (len == 1) { if (values[0] == null) { throw new IllegalArgumentException("Cannot passed null BigDecimal entry to minimum()"); return values[0]; BigDecimal current = values[0]; ... |
BigDecimal | minus(BigDecimal a, BigDecimal b) compute a -b BigDecimal bb = null; if (null != b) { BigDecimal NAV_ONE = new BigDecimal(-1); bb = NAV_ONE.multiply(b); return add(a, bb); |