Java BigDecimal Negate negation(BigDecimal bigDecimal)

Here you can find the source of negation(BigDecimal bigDecimal)

Description

negation

License

Apache License

Declaration

public static BigDecimal negation(BigDecimal bigDecimal) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {
    public static BigDecimal negation(BigDecimal bigDecimal) {
        if (bigDecimal == null) {
            return zeroBigDecimal();
        }/*from  w ww.  j  ava2s .  c  o m*/
        return bigDecimal.negate();
    }

    public static BigDecimal zeroBigDecimal() {
        return new BigDecimal("0.00");
    }
}

Related

  1. negate(BigDecimal amount)
  2. negate(BigDecimal decimal)
  3. negate(final BigDecimal value)
  4. negateIfTrue(final boolean condition, final BigDecimal value)