public final class JDKSupport extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
bigIntegerToLongValueExact(BigInteger value)
Copied from
BigInteger.longValueExact() added in Java 1.8. |
public static final long bigIntegerToLongValueExact(BigInteger value)
BigInteger.longValueExact() added in Java 1.8.
Converts the BigInteger argument to a long, checking for lost
information. If the value of this BigInteger is out of the range
of the long type, then an ArithmeticException is thrown.
value - the BigInteger value to convert to a longvalue converted to a long.ArithmeticException - if the value will not exactly fit in a long.