Here you can find the source of isIntegerValue(final BigDecimal bd)
public static boolean isIntegerValue(final BigDecimal bd)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static final int scale = 24; public static boolean isIntegerValue(final BigDecimal bd) { return bd.signum() == 0 || bd.scale() <= 0 || bd.stripTrailingZeros().scale() <= 0; }/*from w w w.j av a2 s. c om*/ }