public abstract class BigIntegerTools
extends java.lang.Object
| Constructor and Description |
|---|
BigIntegerTools() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Integer |
getExactInt(java.math.BigInteger num)
Returns the integer value corresponding to the given
BigInteger, throwing a ArithmeticException
if the value is out of bounds. |
static java.lang.Long |
getExactLong(java.math.BigInteger num)
Returns the long value corresponding to the given
BigInteger, throwing a ArithmeticException
if the value is out of bounds. |
public static java.lang.Integer getExactInt(java.math.BigInteger num)
BigInteger, throwing a ArithmeticException
if the value is out of bounds.
Implements the intValueExact method of BigInteger that is missing in the Android Sdk.
num - the BigInteger to convertnumjava.lang.ArithmeticException - if the value of num is outside the supported integer valuespublic static java.lang.Long getExactLong(java.math.BigInteger num)
BigInteger, throwing a ArithmeticException
if the value is out of bounds.
Implements the longValueExact method of BigInteger that is missing in the Android Sdk.
num - the BigInteger to convertnumjava.lang.ArithmeticException - if the value of num is outside the supported long values