1、BigInteger
| Modifier and Type | Method and Description |
BigInteger |
abs()返回一个BigInteger,它的值是此BigInteger的绝对值。 |
BigInteger |
add(BigInteger val)返回值为 |
BigInteger |
and(BigInteger val)返回值为 |
BigInteger |
andNot(BigInteger val)返回值为 |
int |
bitCount()返回与其符号位不同的BigInteger的二进制补码表示中的位数。 |
int |
bitLength()返回此BigInteger的最小二进制补码表示中的位数, 不包括符号位。 |
byte |
byteValueExact()将此 |
BigInteger |
clearBit(int n)返回一个BigInteger,其值等于此BigInteger,指定的位被清零。 |
int |
compareTo(BigInteger val)将此BigInteger与指定的BigInteger进行比较。 |
BigInteger |
divide(BigInteger val)返回值为 |
BigInteger[] |
divideAndRemainder(BigInteger val)返回两个BigInteger的数组,其中包含 |
double |
doubleValue()将此BigInteger转换为 |
boolean |
equals(Object x)将此BigInteger与指定的对象进行比较以实现相等。 |
BigInteger |
flipBit(int n)返回一个BigInteger,其值等于此BigInteger,指定的位被翻转。 |
float |
floatValue()将此BigInteger转换为 |
BigInteger |
gcd(BigInteger val)返回一个BigInteger,其值是 |
int |
getLowestSetBit()返回此BigInteger中最右(最低位)一位的索引(最右边一位右侧的零位数)。 |
int |
hashCode()返回此BigInteger的哈希码。 |
int |
intValue()将此BigInteger转换为 |
int |
intValueExact()将此 |
boolean |
isProbablePrime(int certainty)返回 |
long |
longValue()将此BigInteger转换为 |
long |
longValueExact()将此 |
BigInteger |
max(BigInteger val)返回此BigInteger和 |
BigInteger |
min(BigInteger val)返回此BigInteger和 |
BigInteger |
mod(BigInteger m)返回值为 |
BigInteger |
modInverse(BigInteger m)返回值为 |
BigInteger |
modPow(BigInteger exponent, BigInteger m)返回值为 (thisexponent mod m)的BigInteger 。 |
BigInteger |
multiply(BigInteger val)返回值为 |
BigInteger |
negate()返回值为 |
BigInteger |
nextProbablePrime()返回大于这个 |
BigInteger |
not()返回值为 |
BigInteger |
or(BigInteger val)返回值为 |
BigInteger |
pow(int exponent)返回值为 (thisexponent)的BigInteger 。 |
static BigInteger |
probablePrime(int bitLength, Random rnd)返回一个正的BigInteger,它可能是素数,具有指定的位长度。 |
BigInteger |
remainder(BigInteger val)返回值为 |
BigInteger |
setBit(int n)返回一个BigInteger,其值等于具有指定位集合的BigInteger。 |
BigInteger |
shiftLeft(int n)返回值为 |
BigInteger |
shiftRight(int n)返回值为 |
short |
shortValueExact()将此 |
int |
signum()返回此BigInteger的signum函数。 |
BigInteger |
subtract(BigInteger val)返回值为 |
boolean |
testBit(int n)返回 |
byte[] |
toByteArray()返回一个包含此BigInteger的二进制补码表示的字节数组。 |
String |
toString()返回此BigInteger的十进制字符串表示形式。 |
String |
toString(int radix)返回给定基数中BigInteger的String表示形式。 |
static BigInteger |
valueOf(long val)返回一个BigInteger,其值等于指定的 |
BigInteger |
xor(BigInteger val)返回值为 |
2、BigDecimal
| Modifier and Type | Method and Description |
BigDecimal |
abs()返回一个 |
BigDecimal |
abs(MathContext mc)返回一个 |
BigDecimal |
add(BigDecimal augend)返回 |
BigDecimal |
add(BigDecimal augend, MathContext mc)返回 |
byte |
byteValueExact()将此 |
int |
compareTo(BigDecimal val)将此 |
BigDecimal |
divide(BigDecimal divisor)返回 |
BigDecimal |
divide(BigDecimal divisor, int roundingMode)返回 |
BigDecimal |
divide(BigDecimal divisor, int scale, int roundingMode)返回一个 |
BigDecimal |
divide(BigDecimal divisor, int scale, RoundingMode roundingMode)返回一个 |
BigDecimal |
divide(BigDecimal divisor, MathContext mc)返回 |
BigDecimal |
divide(BigDecimal divisor, RoundingMode roundingMode)返回 |
BigDecimal[] |
divideAndRemainder(BigDecimal divisor)返回一个两元件 |
BigDecimal[] |
divideAndRemainder(BigDecimal divisor, MathContext mc)返回一个两元件 |
BigDecimal |
divideToIntegralValue(BigDecimal divisor)返回一个 |
BigDecimal |
divideToIntegralValue(BigDecimal divisor, MathContext mc)返回值为 |
double |
doubleValue()将此 |
boolean |
equals(Object x)将此 |
float |
floatValue()将此 |
int |
hashCode()返回此 |
int |
intValue()将此 |
int |
intValueExact()将此 |
long |
longValue()将此 |
long |
longValueExact()将此 |
BigDecimal |
max(BigDecimal val)返回此 |
BigDecimal |
min(BigDecimal val)返回此 |
BigDecimal |
movePointLeft(int n)返回一个 |
BigDecimal |
movePointRight(int n)返回一个 |
BigDecimal |
multiply(BigDecimal multiplicand)返回 |
BigDecimal |
multiply(BigDecimal multiplicand, MathContext mc)返回 |
BigDecimal |
negate()返回 |
BigDecimal |
negate(MathContext mc)返回 |
BigDecimal |
plus()返回 |
BigDecimal |
plus(MathContext mc)返回 |
BigDecimal |
pow(int n)返回 |
BigDecimal |
pow(int n, MathContext mc)返回 |
int |
precision()返回此 BigDecimal的 |
BigDecimal |
remainder(BigDecimal divisor)返回 |
BigDecimal |
remainder(BigDecimal divisor, MathContext mc)返回 |
BigDecimal |
round(MathContext mc)返回 |
int |
scale()返回此 规模 |
BigDecimal |
scaleByPowerOfTen(int n)返回一个BigDecimal,其数值等于( |
BigDecimal |
setScale(int newScale)返回一个 |
BigDecimal |
setScale(int newScale, int roundingMode)返回一个 |
BigDecimal |
setScale(int newScale, RoundingMode roundingMode)返回一个 |
short |
shortValueExact()将此 |
int |
signum()返回这个 |
BigDecimal |
stripTrailingZeros()返回一个 |
BigDecimal |
subtract(BigDecimal subtrahend)返回 |
BigDecimal |
subtract(BigDecimal subtrahend, MathContext mc)返回 |
BigInteger |
toBigInteger()将此 |
BigInteger |
toBigIntegerExact()将此 |
String |
toEngineeringString()如果需要指数,则使用工程符号返回此 |
String |
toPlainString()返回没有指数字段的此 |
String |
toString()返回此 |
BigDecimal |
ulp()返回此 |
BigInteger |
unscaledValue()返回一个 |
static BigDecimal |
valueOf(double val)转换一个 |
static BigDecimal |
valueOf(long val)将 |
static BigDecimal |
valueOf(long unscaledVal, int scale)将 |