List of utility methods to do BigDecimal Max
BigDecimal | max(BigDecimal a, BigDecimal b) Returns the maximum value between the two. if (a == null) return b; if (b == null) return a; return a.max(b); |
BigDecimal | max(BigDecimal b1, BigDecimal b2) Return max 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 | max(BigDecimal one, BigDecimal other) max return (one.compareTo(other) > 0 ? one : other);
|
BigDecimal | max(BigDecimal... amounts) max BigDecimal result = null; for (BigDecimal bigDecimal : amounts) { if (bigDecimal != null) { result = result == null ? bigDecimal : result.max(bigDecimal); return result; |
BigDecimal | max(BigDecimal... values) Finds maximum value from array of decimals. BigDecimal maxValue = null; if (values != null) { for (BigDecimal value : values) { if (maxValue == null || value != null && value.compareTo(maxValue) >= 0) { maxValue = value; return maxValue; |
BigDecimal | max(final BigDecimal bd1, final BigDecimal bd2) Selects the higher 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 | max(final List max BigDecimal max = BigDecimal.ZERO; for (final BigDecimal item : list) { if (item.compareTo(max) > 0) max = item; return max; |
BigDecimal | max(List Returns the max number in the numbers list. return new TreeSet<BigDecimal>(numbers).last(); |
BigDecimal | maximum(BigDecimal... decimals) Returns the largest 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.max(decimal); ... |
BigDecimal | maximum(BigDecimal... values) Calculate the maximum 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 maximum()"); return values[0]; BigDecimal current = values[0]; ... |