intx Interface
A fixed-precision integer.
Extends
Implemented by
Methods
Code int compareTo(Comparable other) #
int compareTo(Comparable other);
Code int hashCode() #
int hashCode();
Code bool isEven() #
bool isEven();
Code bool isMaxValue() #
bool isMaxValue();
Code bool isMinValue() #
bool isMinValue();
Code bool isNegative() #
bool isNegative();
Code bool isOdd() #
bool isOdd();
Code bool isZero() #
bool isZero();
Code int numberOfLeadingZeros() #
Returns the number of leading zeros in this intx as an int
between 0 and 64.
int numberOfLeadingZeros();
Code int numberOfTrailingZeros() #
Returns the number of trailing zeros in this intx as an int
between 0 and 64.
int numberOfTrailingZeros();
Code bool operator >(other) #
bool operator >(other);
Code bool operator >=(other) #
bool operator >=(other);
Code bool operator <=(other) #
bool operator <=(other);
Code bool operator <(other) #
bool operator <(other);
Code bool operator ==(other) #
bool operator ==(other);
Code List<int> toBytes() #
Converts this intx to a List
of int
, starting with the least
significant byte.
List<int> toBytes();
Code String toHexString() #
Returns the value of this intx as a hexadecimal String
.
String toHexString();
Code int toInt() #
Converts this intx to an int
. On some platforms, inputs with large
absolute values (i.e., > 2^52) may lose some of their low bits.
int toInt();
Code int32 toInt32() #
Converts an intx to 32 bits. Narrower values are sign extended and wider values have their high bits truncated.
int32 toInt32();