java.lang.Object
dev.argon.esexpr.UnsignedBigInteger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ESExprCodec<UnsignedBigInteger> The codec forUnsignedBigInteger.static final UnsignedBigIntegerA constant representing the value one as anUnsignedBigInteger.static final UnsignedBigIntegerA constant representing the value zero as anUnsignedBigInteger. -
Method Summary
Modifier and TypeMethodDescriptionadd(UnsignedBigInteger other) Adds the value of the specifiedUnsignedBigIntegerto this instance and returns the result as a newUnsignedBigInteger.booleaninthashCode()Converts the value to aBigInteger.toString()static UnsignedBigIntegervalueOf(long value) Returns anUnsignedBigIntegerwhose value is equal to the specified long.static UnsignedBigIntegerParses a string as anUnsignedBigInteger.static UnsignedBigIntegervalueOf(BigInteger value) Returns anUnsignedBigIntegerwhose value is equal to the specifiedBigInteger.
-
Field Details
-
ZERO
A constant representing the value zero as anUnsignedBigInteger. -
ONE
A constant representing the value one as anUnsignedBigInteger. -
CODEC
The codec forUnsignedBigInteger.
-
-
Method Details
-
toBigInteger
Converts the value to aBigInteger.- Returns:
- The value as a
BigInteger.
-
valueOf
Returns anUnsignedBigIntegerwhose value is equal to the specifiedBigInteger.- Parameters:
value- The value to wrap.- Returns:
- An
UnsignedBigIntegerinstance. - Throws:
IllegalArgumentException- if the value is negative.
-
valueOf
Returns anUnsignedBigIntegerwhose value is equal to the specified long.- Parameters:
value- The value to wrap.- Returns:
- An
UnsignedBigIntegerinstance. - Throws:
IllegalArgumentException- if the value is negative.
-
valueOf
Parses a string as anUnsignedBigInteger.- Parameters:
value- The value to parse.- Returns:
- An
UnsignedBigIntegerinstance. - Throws:
NumberFormatException- if the value is not
-
add
Adds the value of the specifiedUnsignedBigIntegerto this instance and returns the result as a newUnsignedBigInteger.- Parameters:
other- TheUnsignedBigIntegerto be added to this instance.- Returns:
- A new
UnsignedBigIntegerrepresenting the sum of this instance and the specifiedUnsignedBigInteger.
-
hashCode
-
equals
-
toString
-