Here you can find the source of isInteger(BigDecimal inValue)
public static boolean isInteger(BigDecimal inValue)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static boolean isInteger(BigDecimal inValue) { try {/*from w w w .ja v a2 s . co m*/ inValue.intValueExact(); } catch (final Exception e) { // swallow } return false; } }