AbstractInt<T extends Number> class abstract

Inheritance
Implementers

Constructors

AbstractInt()

Properties

bitLength int
Returns the minimum number of bits required to store this integer.
no setter
bits int
返回bit位数
no setter
hashCode int
The hash code for this object.
no setteroverride
isEven bool
Returns true if and only if this integer is even.
no setter
isOdd bool
Returns true if and only if this integer is odd.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sign int
Returns the sign of this integer.
no setter
value int
实际值
no setteroverride

Methods

abs() → T
Returns the absolute value of this integer.
byteValue() Byte
以byte形式返回指定数字的值
inherited
ceil() → T
Returns this.
ceilToDouble() double
Returns this.toDouble().
compareTo(T other) int
Compares this object to another object.
override
doubleValue() double
以double形式返回指定数字的值
inherited
floor() → T
Returns this.
floorToDouble() double
Returns this.toDouble().
gcd(int other) → T
Returns the greatest common divisor of this integer and other.
intValue() Integer
以int形式返回指定数字的值
inherited
longValue() Long
以long形式返回指定数字的值
inherited
modInverse(int modulus) → T
Returns the modular multiplicative inverse of this integer modulo modulus.
modPow(int exponent, int modulus) → T
Returns this integer to the power of exponent modulo modulus.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
round() → T
Returns this.
roundToDouble() double
Returns this.toDouble().
shortValue() Short
以short形式返回指定数字的值
inherited
toRadixString(int radix) String
Converts this to a string representation in the given radix.
toSigned(int width) int
Returns the least significant width bits of this integer, extending the highest retained bit to the sign. This is the same as truncating the value to fit in width bits using an signed 2-s complement representation. The returned value has the same bit value in all positions higher than width.
toString() String
Returns a string representation of this integer.
override
toUnsigned(int width) int
Returns the least significant width bits of this integer as a non-negative number (i.e. unsigned representation). The returned value has zeros in all bit positions higher than width.
truncate() → T
Returns this.
truncateToDouble() double
Returns this.toDouble().
uByteValue() int
以无符号byte形式返回指定数字的值
inherited
uIntValue() int
以无符号int形式返回指定数字的值
inherited
uLongValue() int
以无符号long形式返回指定数字的值
inherited
uShortValue() int
以无符号short形式返回指定数字的值
inherited
valueOf(int num) → T
创建实例

Operators

operator %(dynamic other) → T
取模
operator &(dynamic other) → T
位和运算符。 将thisother都视为足够大的二进制分量整数,结果是一个数字,其中只有在thisother中设置的位集 如果两个操作数都为负,则结果为负,否则结果为非负
operator *(dynamic other) → T
乘法,结果超出bits时,将溢出范围,具体参考toSigned
operator +(dynamic other) → T
加法,结果超出bits时,将溢出范围,具体参考toSigned
operator -(dynamic other) → T
减法
operator /(dynamic other) double
除法
operator <(dynamic other) bool
小于
operator <<(dynamic other) → T
将此整数的位向左shiftAmount 。 向左移动会使数字变大,有效地将数字乘以pow(2, shiftIndex) 。 结果的大小没有限制。通过使用带有合适掩码的“and”运算符来限制中间值可能是相关的。 如果shiftAmount为负数,则为错误 结果超出bits时,将溢出范围,具体参考toSigned
operator <=(dynamic other) bool
小于等于
operator ==(Object other) bool
相等
override
operator >(dynamic other) bool
大于
operator >=(dynamic other) bool
大于等于
operator >>(dynamic other) → T
将此整数的位向右shiftAmount 。 向右移动会使数字变小并丢弃最低有效位,从而有效地进行pow(2, shiftIndex)的整数除法。 如果shiftAmount为负数,则为错误
operator >>>(dynamic other) → T
按位无符号右移shiftAmount位。 最不重要的shiftAmount位被删除,其余位(如果有)被向下移动,并且零位被移入作为新的最高有效位。 shiftAmount必须为非负数
operator ^(dynamic other) → T
按位异或运算符。 将thisother都视为足够大的二进制分量整数,结果是一个数字,其位集设置在thisother的一个中,但不是同时设置 如果操作数的符号相同,则结果为非负数,否则结果为负数
operator unary-() → T
负数
operator |(dynamic other) → T
按位或运算符。 将thisother都视为足够大的二进制分量整数,结果是一个数字,其位集在thisother中的任何一个中设置 如果两个操作数都是非负数,则结果为非负数,否则结果为负数
operator ~() → T
按位取反运算符。 将this视为足够大的二进制分量整数,结果是设置了相反位的数字。 这将任何整数x映射到-x - 1
operator ~/(dynamic other) → T
除法取整