is Zero BigDecimal - Java java.math

Java examples for java.math:BigDecimal Compare

Description

is Zero BigDecimal

Demo Code

/*/*  w ww .j a va 2 s  . c  om*/
 * Copyright (c) 2005-2009, Topicus b.v.
 * All rights reserved
 */
//package com.java2s;
import java.math.BigDecimal;

public class Main {
    /**
     * @param decimal
     * @return true als de waarde 0 is
     */
    public static final boolean isZero(BigDecimal decimal) {
        return decimal.compareTo(BigDecimal.ZERO) == 0;
    }
}

Related Tutorials