public class BI extends CU
BigIntegers.
The name of this class is an abbreviation of BigInteger. We have intentionally used a short name for readability because this class is intended to be used in calculations and algebraic statements, for example:
long a = ...; long b = ...; BigInteger c = ...; if( BI.lt(a,BI.sum(b,c) ) // Do something...instead of
long a = ...; long b = ...; BigInteger c = ...; if( BigInteger.valueOf(a).compareTo(BigInteger.valueOf(b).add(c)) < 0 ) // Do something...
The aim of this utility class is to facilitate operations with BigIntegers.
| Modifier and Type | Field and Description |
|---|---|
static BinaryOperator<BigInteger> |
AND
Performs the binary and of of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
DIV
Performs the division of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
MAX
Finds the maximum of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
MIN
Finds the minimum of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
MOD
Performs the module of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
MUL
Performs the multiplication of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
OR
Performs the binary or of of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
REM
Performs the reminder of the division of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
SUB
Performs the subtraction of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
SUM
Performs the sum of two
non-null BigInteger values. |
static BinaryOperator<BigInteger> |
XOR
Performs the binary xor of of two
non-null BigInteger values. |
| Modifier and Type | Method and Description |
|---|---|
static BigInteger |
and(BigInteger a,
BigInteger b)
This is a
null-safe method that, given two BigInteger
values a and b, returns the binary operation a & b. |
static BigInteger |
and(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b,
returns the binary operation a & b. |
static BigInteger |
and(long a,
BigInteger b)
This is a
null-safe method that, given a long value
a and a BigInteger value b,
returns the binary operation a & b. |
static BigInteger |
and(long a,
long b)
|
static BigInteger |
apply(BinaryOperator<BigInteger> operator,
BigInteger a,
BigInteger b)
This is a
null-safe method that, given two BigInteger
values a and b, returns the result of the given operator. |
static BigInteger |
div(BigInteger a,
BigInteger b)
|
static BigInteger |
div(BigInteger a,
long b)
|
static BigInteger |
div(long a,
BigInteger b)
|
static BigInteger |
div(long a,
long b)
|
static boolean |
eq(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a == b. |
static boolean |
eq(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a == b. |
static boolean |
eq(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a == b. |
static boolean |
eq(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a == b. |
static boolean |
ge(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a >= b. |
static boolean |
ge(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a >= b. |
static boolean |
ge(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a >= b. |
static boolean |
ge(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a >= b. |
static boolean |
gt(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a > b. |
static boolean |
gt(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a > b. |
static boolean |
gt(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a > b. |
static boolean |
gt(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a > b. |
static boolean |
le(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a <= b. |
static boolean |
le(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a <= b. |
static boolean |
le(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a <= b. |
static boolean |
le(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a <= b. |
static boolean |
lt(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a < b. |
static boolean |
lt(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a < b. |
static boolean |
lt(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a < b. |
static boolean |
lt(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a < b. |
static BigInteger |
max(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns the
maximum value between them. |
static BigInteger |
max(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns the
maximum value between them. |
static BigInteger |
max(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b, returns the
maximum value between them. |
static BigInteger |
max(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b, returns the
maximum value between them. |
static BigInteger |
max(long a,
long b)
|
static BigInteger |
min(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns the
minimum value between them. |
static BigInteger |
min(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns the
minimum value between them. |
static BigInteger |
min(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b, returns the
minimum value between them. |
static BigInteger |
min(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b, returns the
minimum value between them. |
static BigInteger |
min(long a,
long b)
|
static BigInteger |
mod(BigInteger a,
BigInteger b)
|
static BigInteger |
mod(BigInteger a,
long b)
|
static BigInteger |
mod(long a,
BigInteger b)
|
static BigInteger |
mod(long a,
long b)
|
static BigInteger |
mul(BigInteger a,
BigInteger b)
|
static BigInteger |
mul(BigInteger a,
long b)
|
static BigInteger |
mul(long a,
BigInteger b)
|
static BigInteger |
mul(long a,
long b)
|
static boolean |
ne(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if {@code a ! |
static boolean |
ne(BigInteger a,
long b,
boolean nullLast)
This is a
null-safe method that, given a BigInteger
value a and a long value b, returns true
if {@code a ! |
static boolean |
ne(long a,
BigInteger b)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if {@code a ! |
static boolean |
ne(long a,
BigInteger b,
boolean nullLast)
This is a
null-safe method that, given a long
value a and a BigInteger value b,
returns true if {@code a ! |
static BigInteger |
of(long value)
Wrapper for the method
BigInteger.valueOf(long). |
static BigInteger |
of(String value)
Transforms the string representation of a number
into a
BigInteger. |
static BigInteger |
or(BigInteger a,
BigInteger b)
This is a
null-safe method that, given two BigInteger
values a and b, returns the binary operation a | b. |
static BigInteger |
or(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b,
returns the binary operation a | b. |
static BigInteger |
or(long a,
BigInteger b)
This is a
null-safe method that, given a long value
a and a BigInteger value b,
returns the binary operation a | b. |
static BigInteger |
or(long a,
long b)
|
static BigInteger |
rem(BigInteger a,
BigInteger b)
|
static BigInteger |
rem(BigInteger a,
long b)
|
static BigInteger |
rem(long a,
BigInteger b)
|
static BigInteger |
rem(long a,
long b)
|
static BigInteger |
sub(BigInteger a,
BigInteger b)
|
static BigInteger |
sub(BigInteger a,
long b)
|
static BigInteger |
sub(long a,
BigInteger b)
|
static BigInteger |
sub(long a,
long b)
|
static BigInteger |
sum(BigInteger a,
BigInteger b)
|
static BigInteger |
sum(BigInteger a,
long b)
|
static BigInteger |
sum(long a,
BigInteger b)
|
static BigInteger |
sum(long a,
long b)
|
static BigInteger |
xor(BigInteger a,
BigInteger b)
This is a
null-safe method that, given two BigInteger
values a and b, returns the binary operation a ^ b. |
static BigInteger |
xor(BigInteger a,
long b)
This is a
null-safe method that, given a BigInteger
value a and a long value b,
returns the binary operation a ^ b. |
static BigInteger |
xor(long a,
BigInteger b)
This is a
null-safe method that, given a long value
a and a BigInteger value b,
returns the binary operation a ^ b. |
static BigInteger |
xor(long a,
long b)
|
nullFirstNaturalOrderComparator, nullLastNaturalOrderComparator, nullSafeNaturalOrderComparatorpublic static BinaryOperator<BigInteger> SUM
non-null BigInteger values.public static BinaryOperator<BigInteger> SUB
non-null BigInteger values.public static BinaryOperator<BigInteger> MUL
non-null BigInteger values.public static BinaryOperator<BigInteger> DIV
non-null BigInteger values.public static BinaryOperator<BigInteger> REM
non-null BigInteger values.public static BinaryOperator<BigInteger> MOD
non-null BigInteger values.
This operation differs form REM because a reminder can be
negative while the module is always >= 0.public static BinaryOperator<BigInteger> AND
non-null BigInteger values.public static BinaryOperator<BigInteger> OR
non-null BigInteger values.public static BinaryOperator<BigInteger> XOR
non-null BigInteger values.public static BinaryOperator<BigInteger> MIN
non-null BigInteger values.public static BinaryOperator<BigInteger> MAX
non-null BigInteger values.public static BigInteger of(long value)
BigInteger.valueOf(long).value - value of the BigInteger to return.public static BigInteger of(String value)
BigInteger.
If the argument is null or empty
this method returns null.
If the argument is not empty and does not represent a number this method throws an exception.
value - decimal String representation of BigInteger.NumberFormatException - if value is not a valid
representation of a BigInteger.public static BigInteger sum(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns a + b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - value to add.b - value to add.BigInteger representing a + b.public static BigInteger sum(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns a + b.
If the BigInteger values is null, the other will be returned.
a - value to add.b - value to add.BigInteger representing a + b.public static BigInteger sum(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b, returns a + b.
If the BigInteger values is null, the other will be returned.
a - value to add.b - value to add.BigInteger representing a + b.public static BigInteger sum(long a, long b)
a - value to add.b - value to add.BigInteger representing a + b.public static BigInteger sub(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns a - b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - value to subtract from.b - value to be subtracted.BigInteger representing a - b.public static BigInteger sub(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns a - b.
If the BigInteger values is null, the other will be returned.
a - value to subtract from.b - value to be subtracted.BigInteger representing a - b.public static BigInteger sub(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b, returns a - b.
If the BigInteger values is null, the other will be returned.
a - value to subtract from.b - value to be subtracted.BigInteger representing a - b.public static BigInteger sub(long a, long b)
a - value to subtract from.b - value to be subtracted.BigInteger representing a - b.public static BigInteger mul(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns a * b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - value to multiply.b - value to multiply.BigInteger representing a * b.public static BigInteger mul(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns a * b.
If the BigInteger values is null, the other will be returned.
a - value to multiply.b - value to multiply.BigInteger representing a * b.public static BigInteger mul(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b, returns a * b.
If the BigInteger values is null, the other will be returned.
a - value to multiply.b - value to multiply.BigInteger representing a * b.public static BigInteger mul(long a, long b)
a - value to multiply.b - value to multiply.BigInteger representing a * b.public static BigInteger div(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns a / b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - value to be divided.b - the divider value.BigInteger representing a / b.public static BigInteger div(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns a / b.
If the BigInteger values is null, the other will be returned.
a - value to be divided.b - the divider value.BigInteger representing a / b.public static BigInteger div(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b, returns a / b.
If the BigInteger values is null, the other will be returned.
a - value to be divided.b - the divider value.BigInteger representing a / b.public static BigInteger div(long a, long b)
a - value to be divided.b - the divider value.BigInteger representing a / b.public static BigInteger rem(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns a % b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - value to be divided.b - the divider value.BigInteger representing a % b.public static BigInteger rem(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns a % b.
If the BigInteger values is null, the other will be returned.
a - value to be divided.b - the divider value.BigInteger representing a % b.public static BigInteger rem(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b, returns a % b.
If the BigInteger values is null, the other will be returned.
a - value to be divided.b - the divider value.BigInteger representing a % b.public static BigInteger rem(long a, long b)
a - value to be divided.b - the divider value.BigInteger representing a % b.public static BigInteger mod(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns a mod b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
This operation differs form rem(BigInteger,BigInteger)
because a reminder can be negative while the module is always >= 0.
a - value to be divided.b - value of the module.BigInteger representing a mod b.public static BigInteger mod(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns a mod b.
If the BigInteger values is null, the other will be returned.
This operation differs form rem(BigInteger,long)
because a reminder can be negative while the module is always >= 0.
a - value to be divided.b - value of the module.BigInteger representing a mod b.public static BigInteger mod(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b, returns a mod b.
If the BigInteger values is null, the other will be returned.
This operation differs form rem(long,BigInteger)
because a reminder can be negative while the module is always >= 0.
a - value to be divided.b - value of the module.BigInteger representing a mod b.public static BigInteger mod(long a, long b)
long values a and b,
returns a BigInteger that represents the value
a mod b.
This operation differs form rem(long,long)
because a reminder can be negative while the module is always >= 0.
a - value to be divided.b - value of the module.BigInteger representing a mod b.public static BigInteger and(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns the binary operation a & b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - an operand.b - an operand.BigInteger representing a & b.public static BigInteger and(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b,
returns the binary operation a & b.
If the BigInteger values is null, the other will be returned.
a - an operand.b - an operand.BigInteger representing a & b.public static BigInteger and(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b,
returns the binary operation a & b.
If the BigInteger values is null, the other will be returned.
a - an operand.b - an operand.BigInteger representing a & b.public static BigInteger and(long a, long b)
a - an operand.b - an operand.BigInteger representing a & b.public static BigInteger or(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns the binary operation a | b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - an operand.b - an operand.BigInteger representing a | b.public static BigInteger or(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b,
returns the binary operation a | b.
If the BigInteger values is null, the other will be returned.
a - an operand.b - an operand.BigInteger representing a | b.public static BigInteger or(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b,
returns the binary operation a | b.
If the BigInteger values is null, the other will be returned.
a - an operand.b - an operand.BigInteger representing a | b.public static BigInteger or(long a, long b)
a - an operand.b - an operand.BigInteger representing a | b.public static BigInteger xor(BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns the binary operation a ^ b.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
a - an operand.b - an operand.BigInteger representing a ^ b.public static BigInteger xor(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b,
returns the binary operation a ^ b.
If the BigInteger values is null, the other will be returned.
a - an operand.b - an operand.BigInteger representing a ^ b.public static BigInteger xor(long a, BigInteger b)
null-safe method that, given a long value
a and a BigInteger value b,
returns the binary operation a ^ b.
If the BigInteger values is null, the other will be returned.
a - an operand.b - an operand.BigInteger representing a ^ b.public static BigInteger xor(long a, long b)
a - an operand.b - an operand.BigInteger representing a ^ b.public static BigInteger min(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns the
minimum value between them. If the values are equal returns a.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a and b.public static BigInteger min(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns the
minimum value between them. If the values are equal returns a.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a and b.public static BigInteger min(long a, BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b, returns the
minimum value between them. If the values are equal returns a.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a and b.public static BigInteger min(long a, BigInteger b, boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b, returns the
minimum value between them. If the values are equal returns a.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a and b.public static BigInteger min(long a, long b)
a - value to compare.b - value to compare.a and b.public static BigInteger max(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns the
maximum value between them. If the values are equal returns a.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a and b.public static BigInteger max(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns the
maximum value between them. If the values are equal returns a.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a and b.public static BigInteger max(long a, BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b, returns the
maximum value between them. If the values are equal returns a.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a and b.public static BigInteger max(long a, BigInteger b, boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b, returns the
maximum value between them. If the values are equal returns a.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a and b.public static BigInteger max(long a, long b)
a - value to compare.b - value to compare.a and b.public static boolean lt(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a < b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a < b.public static boolean lt(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a < b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a < b.public static boolean lt(long a,
BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a < b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a < b.public static boolean lt(long a,
BigInteger b,
boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a < b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a < b.public static boolean le(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a <= b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a <= b.public static boolean le(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a <= b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a <= b.public static boolean le(long a,
BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a <= b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a <= b.public static boolean le(long a,
BigInteger b,
boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a <= b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a <= b.public static boolean eq(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a == b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a == b.public static boolean eq(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a == b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a == b.public static boolean eq(long a,
BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a == b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a == b.public static boolean eq(long a,
BigInteger b,
boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a == b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a == b.public static boolean ne(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a != b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a != b.public static boolean ne(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a != b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a != b.public static boolean ne(long a,
BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a != b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a != b.public static boolean ne(long a,
BigInteger b,
boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a != b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a != b.public static boolean ge(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a >= b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a >= b.public static boolean ge(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a >= b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a >= b.public static boolean ge(long a,
BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a >= b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a >= b.public static boolean ge(long a,
BigInteger b,
boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a >= b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a >= b.public static boolean gt(BigInteger a, long b)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a > b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a > b.public static boolean gt(BigInteger a, long b, boolean nullLast)
null-safe method that, given a BigInteger
value a and a long value b, returns true
if a > b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a > b.public static boolean gt(long a,
BigInteger b)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a > b.
This method considers null to be less than non-null.
a - value to compare.b - value to compare.a > b.public static boolean gt(long a,
BigInteger b,
boolean nullLast)
null-safe method that, given a long
value a and a BigInteger value b,
returns true if a > b.
This method considers null to be less than or greater
than non-null based on the value of nullLast.
a - value to compare.b - value to compare.nullLast - tells if null is greater than non-null.a > b.public static BigInteger apply(BinaryOperator<BigInteger> operator, BigInteger a, BigInteger b)
null-safe method that, given two BigInteger
values a and b, returns the result of the given operator.
If one of the values is null, the other will be returned.
If both values are null, then null will be returned.
operator - the operator to be applied.a - an operand.b - an operand.Copyright © 2011–2020 Nerd4j. All rights reserved.