Java BigInteger Value Check isLong(BigInteger number)

Here you can find the source of isLong(BigInteger number)

Description

is Long

License

Apache License

Declaration

private static boolean isLong(BigInteger number) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.math.BigInteger;

public class Main {
    private static boolean isLong(BigInteger number) {
        long i = number.longValue();
        BigInteger b = new BigInteger(String.valueOf(i));
        return number.equals(b);
    }/*from ww w  .  j a  v a2s  .c om*/
}

Related

  1. isIn20PercentRange(BigInteger first, BigInteger second)
  2. isInRange(BigInteger in, int range, double eps)
  3. isInt(final BigInteger i)
  4. isIntValue(BigInteger bi)
  5. isLessThan(BigInteger valueA, BigInteger valueB)
  6. isMersenneNumber(BigInteger n)
  7. isNegative(BigInteger i)
  8. isNumberInRange(String text, BigInteger min, BigInteger max)
  9. isOdd(BigInteger in)