java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.primitives.LargeIntHandler |
Handler for large integers of a given maximum bitsize. Those objects are created through a factory method.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BigInteger | add(BigInteger a, BigInteger b) | ||||||||||
BigInteger | and(BigInteger a, BigInteger b) | ||||||||||
BigInteger | clearbit(BigInteger a, int n) | ||||||||||
int | compare(BigInteger a, BigInteger b) | ||||||||||
int | compareU(BigInteger a, BigInteger b) | ||||||||||
static LargeIntHandler | create(int bitsize) | ||||||||||
BigInteger |
create(String val)
Create a new big integer.
| ||||||||||
BigInteger[] | div2S(BigInteger a, BigInteger b) | ||||||||||
BigInteger[] | div2U(BigInteger a, BigInteger b) | ||||||||||
BigInteger | divS(BigInteger a, BigInteger b) | ||||||||||
BigInteger | divU(BigInteger a, BigInteger b) | ||||||||||
int | getBitsize() | ||||||||||
BigInteger | mul2S(BigInteger a, BigInteger b) | ||||||||||
BigInteger | mul2U(BigInteger a, BigInteger b) | ||||||||||
BigInteger | mulS(BigInteger a, BigInteger b) | ||||||||||
BigInteger | mulU(BigInteger a, BigInteger b) | ||||||||||
BigInteger | neg(BigInteger a) | ||||||||||
BigInteger | not(BigInteger a) | ||||||||||
BigInteger | or(BigInteger a, BigInteger b) | ||||||||||
BigInteger | remS(BigInteger a, BigInteger b) | ||||||||||
BigInteger | remU(BigInteger a, BigInteger b) | ||||||||||
BigInteger | rol(BigInteger a, int n) | ||||||||||
BigInteger | ror(BigInteger a, int n) | ||||||||||
BigInteger | sar(BigInteger a, int n) | ||||||||||
BigInteger | setbit(BigInteger a, int n) | ||||||||||
BigInteger | shl(BigInteger a, int n) | ||||||||||
BigInteger | shr(BigInteger a, int n) | ||||||||||
BigInteger | sub(BigInteger a, BigInteger b) | ||||||||||
boolean | testbit(BigInteger a, int n) | ||||||||||
BigInteger |
toUnsigned(BigInteger a)
Get the unsigned equivalent of the provided truncated integer.
| ||||||||||
String | toUnsignedHexString(BigInteger v) | ||||||||||
BigInteger |
truncate(BigInteger v)
Truncate and store as a signed value.
| ||||||||||
BigInteger |
truncate(String val)
Truncate and store as a signed value.
| ||||||||||
BigInteger | xor(BigInteger a, BigInteger b) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create a new big integer. The client is responsible for making sure that the two-complement
representation of the value fits within bitsize
bits.
Get the unsigned equivalent of the provided truncated integer.
Warning, this method is unsafe! The result may no longer be representable on bitsize bits.
Truncate and store as a signed value. The resulting integer 2-complement representation holds
on at most bitsize
bits.
Truncate and store as a signed value. The resulting integer 2-complement representation holds
on at most bitsize
bits.
val | string value (decimal, hex, or octal - with the right associated prefix or suffix) |
---|