Byte class
限制int为8位Byte
- Inheritance
-
- Object
- Comparable<
Byte> - Number<
Byte> - AbstractInt<
Byte> - Byte
Properties
- bitLength → int
-
Returns the minimum number of bits required to store this integer.
no setterinherited
- bits → int
-
返回bit位数
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEven → bool
-
Returns true if and only if this integer is even.
no setterinherited
- isOdd → bool
-
Returns true if and only if this integer is odd.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sign → int
-
Returns the sign of this integer.
no setterinherited
- value → int
-
实际值
no setteroverride
Methods
-
abs(
) → Byte -
Returns the absolute value of this integer.
inherited
-
byteValue(
) → Byte -
以byte形式返回指定数字的值
inherited
-
ceil(
) → Byte -
Returns
this
.inherited -
ceilToDouble(
) → double -
Returns
this.toDouble()
.inherited -
compareTo(
Byte other) → int -
Compares this object to another object.
inherited
-
doubleValue(
) → double -
以double形式返回指定数字的值
inherited
-
floor(
) → Byte -
Returns
this
.inherited -
floorToDouble(
) → double -
Returns
this.toDouble()
.inherited -
gcd(
int other) → Byte -
Returns the greatest common divisor of this integer and
other
.inherited -
intValue(
) → Integer -
以int形式返回指定数字的值
inherited
-
longValue(
) → Long -
以long形式返回指定数字的值
inherited
-
modInverse(
int modulus) → Byte -
Returns the modular multiplicative inverse of this integer
modulo
modulus
.inherited -
modPow(
int exponent, int modulus) → Byte -
Returns this integer to the power of
exponent
modulomodulus
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
round(
) → Byte -
Returns
this
.inherited -
roundToDouble(
) → double -
Returns
this.toDouble()
.inherited -
shortValue(
) → Short -
以short形式返回指定数字的值
inherited
-
toRadixString(
int radix) → String -
Converts this to a string representation in the given
radix
.inherited -
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 inwidth
bits using an signed 2-s complement representation. The returned value has the same bit value in all positions higher thanwidth
.inherited -
toString(
) → String -
Returns a string representation of this integer.
inherited
-
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 thanwidth
.inherited -
truncate(
) → Byte -
Returns
this
.inherited -
truncateToDouble(
) → double -
Returns
this.toDouble()
.inherited -
uByteValue(
) → int -
以无符号byte形式返回指定数字的值
inherited
-
uIntValue(
) → int -
以无符号int形式返回指定数字的值
inherited
-
uLongValue(
) → int -
以无符号long形式返回指定数字的值
inherited
-
uShortValue(
) → int -
以无符号short形式返回指定数字的值
inherited
-
valueOf(
int num) → Byte -
创建实例
override
Operators
-
operator %(
dynamic other) → Byte -
取模
inherited
-
operator &(
dynamic other) → Byte -
位和运算符。
将this和
other
都视为足够大的二进制分量整数,结果是一个数字,其中只有在this和other
中设置的位集 如果两个操作数都为负,则结果为负,否则结果为非负inherited -
operator *(
dynamic other) → Byte -
乘法,结果超出bits时,将溢出范围,具体参考toSigned
inherited
-
operator +(
dynamic other) → Byte -
加法,结果超出bits时,将溢出范围,具体参考toSigned
inherited
-
operator -(
dynamic other) → Byte -
减法
inherited
-
operator /(
dynamic other) → double -
除法
inherited
-
operator <(
dynamic other) → bool -
小于
inherited
-
operator <<(
dynamic other) → Byte -
将此整数的位向左
shiftAmount
。 向左移动会使数字变大,有效地将数字乘以pow(2, shiftIndex) 。 结果的大小没有限制。通过使用带有合适掩码的“and”运算符来限制中间值可能是相关的。 如果shiftAmount
为负数,则为错误 结果超出bits时,将溢出范围,具体参考toSignedinherited -
operator <=(
dynamic other) → bool -
小于等于
inherited
-
operator ==(
Object other) → bool -
相等
inherited
-
operator >(
dynamic other) → bool -
大于
inherited
-
operator >=(
dynamic other) → bool -
大于等于
inherited
-
operator >>(
dynamic other) → Byte -
将此整数的位向右
shiftAmount
。 向右移动会使数字变小并丢弃最低有效位,从而有效地进行pow(2, shiftIndex)的整数除法。 如果shiftAmount
为负数,则为错误inherited -
operator >>>(
dynamic other) → Byte -
按位无符号右移
shiftAmount
位。 最不重要的shiftAmount
位被删除,其余位(如果有)被向下移动,并且零位被移入作为新的最高有效位。shiftAmount
必须为非负数inherited -
operator ^(
dynamic other) → Byte -
按位异或运算符。
将this和
other
都视为足够大的二进制分量整数,结果是一个数字,其位集设置在this和other
的一个中,但不是同时设置 如果操作数的符号相同,则结果为非负数,否则结果为负数inherited -
operator unary-(
) → Byte -
负数
inherited
-
operator |(
dynamic other) → Byte -
按位或运算符。
将this和
other
都视为足够大的二进制分量整数,结果是一个数字,其位集在this和other
中的任何一个中设置 如果两个操作数都是非负数,则结果为非负数,否则结果为负数inherited -
operator ~(
) → Byte -
按位取反运算符。
将this视为足够大的二进制分量整数,结果是设置了相反位的数字。
这将任何整数x映射到-x - 1
inherited
-
operator ~/(
dynamic other) → Byte -
除法取整
inherited