Java BigDecimal Value Check isZeroOrNull(final BigDecimal value)

Here you can find the source of isZeroOrNull(final BigDecimal value)

Description

is Zero Or Null

License

Open Source License

Declaration

public static boolean isZeroOrNull(final BigDecimal value) 

Method Source Code


//package com.java2s;
// ProjectForge is dual-licensed.

import java.math.BigDecimal;

public class Main {
    public static boolean isZeroOrNull(final Integer value) {
        return (value == null || value == 0);
    }//from ww w. j a  v  a  2 s.co  m

    public static boolean isZeroOrNull(final BigDecimal value) {
        return (value == null || value.compareTo(BigDecimal.ZERO) == 0);
    }
}

Related

  1. isZero(BigDecimal d)
  2. isZero(BigDecimal decimal)
  3. isZero(BigDecimal inValue)
  4. isZero(final BigDecimal b)
  5. isZero(final BigDecimal value)