Here you can find the source of isZero(final BigDecimal value)
public static boolean isZero(final BigDecimal value)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { /**/*from w w w.j a v a2s . c om*/ * @return true if value !=null and 0. */ public static boolean isZero(final BigDecimal value) { return value != null && value.signum() == 0; } /** * If value is null return 0 otherwise the signum(). * * @param value * @return */ public static int signum(final BigDecimal value) { return value == null ? 0 : value.signum(); } }