Java Utililty Methods BigDecimal Negate

List of utility methods to do BigDecimal Negate

Description

The list of methods to do BigDecimal Negate are organized into topic(s).

Method

BigDecimalnegate(BigDecimal amount)
negate
return !isZeroOrNull(amount) ? amount.negate() : amount;
BigDecimalnegate(BigDecimal decimal)
Returns the negated value of the given decimal number.
if (decimal == null)
    return null;
return decimal.negate();
BigDecimalnegate(final BigDecimal value)
Returns the negate of the value, handles null.
return value != null ? value.negate() : null;
BigDecimalnegateIfTrue(final boolean condition, final BigDecimal value)
Returns the negate of the value if condition is true, handles null.
return condition ? negate(value) : value;
BigDecimalnegation(BigDecimal bigDecimal)
negation
if (bigDecimal == null) {
    return zeroBigDecimal();
return bigDecimal.negate();