public class BigIntegerUtils extends Object
| 构造器和说明 |
|---|
BigIntegerUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static BigInteger |
addToBigInteger(String str1,
String str2) |
static String |
addToString(String str1,
String str2)
两个数字字符串相加
|
static String |
bigIntegerToString(BigInteger bigInteger)
BigInteger 转 String
|
static String |
bigIntegerToString(BigInteger bigInteger,
int size) |
static int |
compare(String str1,
String str2)
两个数字字符串比较大小
|
static BigInteger |
divToBigInteger(String str1,
String str2) |
static String |
divToString(String str1,
String str2)
两个数字字符串相除
|
static boolean |
isEqual(BigInteger b1,
BigInteger b2) |
static boolean |
isEqual(String str1,
String str2)
第一个是等于第二个数
|
static boolean |
isEqualOrGreaterThan(BigInteger b1,
BigInteger b2)
第一个是大于等于第二个数
|
static boolean |
isEqualOrLessThan(BigInteger b1,
BigInteger b2)
第一个小于等于第二个数
|
static boolean |
isGreaterThan(BigInteger b1,
BigInteger b2) |
static boolean |
isGreaterThan(String str1,
String str2)
第一个是大于第二个数
|
static boolean |
isLessThan(BigInteger b1,
BigInteger b2) |
static boolean |
isLessThan(String str1,
String str2)
第一个是小于第二个数
|
static BigInteger |
modToBigIntegr(String str1,
String str2) |
static String |
modToString(String str1,
String str2)
两个数字字符串取模
|
static BigInteger |
mulToInteger(String str1,
String str2) |
static String |
mulToString(String str1,
String str2)
两个数字字符串相乘
|
static BigInteger |
remToBigInteger(String str1,
String str2) |
static String |
remToString(String str1,
String str2)
两个数字字符串求余
|
static BigInteger |
stringToBigInteger(String str)
String 转 BigInteger
|
static BigInteger |
subToBigInteger(String str1,
String str2) |
static String |
subToString(String str1,
String str2)
两个数字字符串相减
|
public static final String ZERO
public static BigInteger stringToBigInteger(String str)
str - 数字字符串public static String bigIntegerToString(BigInteger bigInteger)
bigInteger - 数字public static String bigIntegerToString(BigInteger bigInteger, int size)
public static BigInteger addToBigInteger(String str1, String str2)
public static BigInteger subToBigInteger(String str1, String str2)
public static BigInteger mulToInteger(String str1, String str2)
public static BigInteger divToBigInteger(String str1, String str2)
public static BigInteger modToBigIntegr(String str1, String str2)
public static BigInteger remToBigInteger(String str1, String str2)
public static boolean isEqual(BigInteger b1, BigInteger b2)
public static boolean isLessThan(BigInteger b1, BigInteger b2)
public static boolean isGreaterThan(BigInteger b1, BigInteger b2)
public static boolean isEqualOrGreaterThan(BigInteger b1, BigInteger b2)
public static boolean isEqualOrLessThan(BigInteger b1, BigInteger b2)
Copyright © 2021. All rights reserved.