Here you can find the source of bigDecimalEqual(BigDecimal a, BigDecimal b)
public static boolean bigDecimalEqual(BigDecimal a, BigDecimal b)
//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 }