Here you can find the source of isLong(BigDecimal inValue)
public static boolean isLong(BigDecimal inValue)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static boolean isLong(BigDecimal inValue) { try {// ww w. ja va 2 s . c o m inValue.longValueExact(); } catch (final Exception e) { // swallow } return false; } }