List of utility methods to do BigDecimal Max
BigDecimal | maxUsingFirstSignum(final BigDecimal... values) max Using First Signum BigDecimal max = BigDecimal.ZERO; boolean signumDetected = false; BigDecimal signum = BigDecimal.ONE; for (BigDecimal value : values) { if (value != null && value.compareTo(BigDecimal.ZERO) != 0) { if (!signumDetected) { signum = BigDecimal.valueOf(value.signum() == -1 ? -1 : 1); signumDetected = true; ... |
boolean | maxValue(BigDecimal origen, BigDecimal montoMaximo) max Value if (origen == null) return false; return origen.compareTo(montoMaximo) > 0; |
BigDecimal | maxValue(BigDecimal[] bigDecimalNumbers) max Value return bigDecimalNumbers[bigDecimalNumbers.length - 1];
|