Here you can find the source of isNotZero(final BigDecimal value)
Parameter | Description |
---|---|
value | a parameter |
public static boolean isNotZero(final BigDecimal value)
//package com.java2s; // ProjectForge is dual-licensed. import java.math.BigDecimal; public class Main { /**//from www . j a va2 s . c om * @param value * @return true, if the given value is not null and not zero. */ public static boolean isNotZero(final Integer value) { return !isZeroOrNull(value); } /** * @param value * @return true, if the given value is not null and not zero. */ public static boolean isNotZero(final BigDecimal value) { return !isZeroOrNull(value); } public static boolean isZeroOrNull(final Integer value) { return (value == null || value == 0); } public static boolean isZeroOrNull(final BigDecimal value) { return (value == null || value.compareTo(BigDecimal.ZERO) == 0); } }