Here you can find the source of isZero(BigDecimal inValue)
public static boolean isZero(BigDecimal inValue)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static boolean isZero(BigDecimal inValue) { return inValue != null && BigDecimal.ZERO.compareTo(inValue) == 0; }/*from www . j ava2s. c o m*/ public static <T extends Comparable<T>> int compareTo(T t1, T t2) { return compareToNullLast(t1, t2); } public static <T extends Comparable<T>> int compareToNullLast(T t1, T t2) { if (t1 == t2) { return 0; } else if (t1 == null) { return 1; } else if (t2 == null) { return -1; } else { return t1.compareTo(t2); } } }