Java BigDecimal Value Check isLong(BigDecimal inValue)

Here you can find the source of isLong(BigDecimal inValue)

Description

is Long

License

Open Source License

Declaration

public static boolean isLong(BigDecimal inValue) 

Method Source Code

//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;
    }
}

Related

  1. isFirstEqualToSecond(final BigDecimal first, final BigDecimal second)
  2. isJavaMathBigDecimal(Object value)
  3. isLessOrEqualThanZero(BigDecimal value)
  4. isLessThan(final BigDecimal thiss, final BigDecimal that)
  5. isLessThen(BigDecimal value1, BigDecimal value2)
  6. isLongNumber(BigDecimal minCar)
  7. isLowerThanOne(@Nonnull final BigDecimal aValue)
  8. isMaximumDecimalValue(BigDecimal maxValue)
  9. isMoreThanZero(BigDecimal decimal)