Java BigDecimal Equal bigDecimalEqual(BigDecimal a, BigDecimal b)

Here you can find the source of bigDecimalEqual(BigDecimal a, BigDecimal b)

Description

big Decimal Equal

License

Apache License

Declaration

public static boolean bigDecimalEqual(BigDecimal a, BigDecimal b) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    public static boolean bigDecimalEqual(BigDecimal a, BigDecimal b) {
        return (a == b) || (a != null && b != null && a.compareTo(b) == 0);
    }//  w w  w . ja  va 2s  .c om
}

Related

  1. bigDecimalEquals(BigDecimal a, Number b)
  2. bigDecimalEqualsOrBothNull(BigDecimal obj1, BigDecimal obj2)
  3. equalBD(BigDecimal val1, BigDecimal val2)
  4. equals(BigDecimal a, BigDecimal b)