Java BigDecimal Parse isInteger(BigDecimal decimal)

Here you can find the source of isInteger(BigDecimal decimal)

Description

is Integer

License

Open Source License

Declaration

public static boolean isInteger(BigDecimal decimal) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;
import java.math.RoundingMode;

public class Main {

    public static boolean isInteger(BigDecimal decimal) {
        BigDecimal decimal_int = decimal.setScale(1, RoundingMode.DOWN);
        return decimal_int.compareTo(decimal) == 0 ? true : false;
    }//  w ww.  ja v a2s.  c  om
}

Related

  1. isBigDecimal(Object v)
  2. isBigDecimal(String str)
  3. isBigDecimal(String value)
  4. isBigDecimalAssignable(String javaDataType)
  5. isBigDecimalType(Class type)
  6. isInteger(BigDecimal inValue)
  7. isIntegerBigDecimal(BigDecimal bd)
  8. isIntegerValue(final BigDecimal bd)
  9. parseBigDecimal(Object o, BigDecimal defaulti)