Here you can find the source of bigDecimalEqualsOrBothNull(BigDecimal obj1, BigDecimal obj2)
public static boolean bigDecimalEqualsOrBothNull(BigDecimal obj1, BigDecimal obj2)
//package com.java2s; import java.math.BigDecimal; public class Main { public static boolean bigDecimalEqualsOrBothNull(BigDecimal obj1, BigDecimal obj2) { if (obj1 == null && obj2 == null) { return true; }/*from w w w . jav a2s . c o m*/ if (obj1 != null && obj2 != null) { return obj1.compareTo(obj2) == 0; } return false; } }