i8 class
8-bit Signed Integer
-128
to 127
The i8
type is contagious. Most operations on i8
will return i8
values
Constructors
- i8(int value)
- 8-bit Signed Integer
- i8.fromEnvironment(String name, {int defaultValue = 0})
-
8-bit Signed Integer
factory
- i8.integer(integer val)
- 8-bit Signed Integer
- i8.parse(String source, {int? radix})
- 8-bit Signed Integer
Properties
- hashCode ↔ int
-
The hash code for this object.
getter/setter pairinherited
- 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
-
Value of the integer
no setterinherited
Methods
-
abs(
) → u8 -
Returns the absolute value of this integer.
override
-
ceilToDouble(
) → double -
Returns
this.toDouble()
.inherited -
compareTo(
integer other) → int -
Compares this object to another object.
inherited
-
floorToDouble(
) → double -
Returns
this.toDouble()
.inherited -
gcd(
integer other) → i8 -
Returns the greatest common divisor of this integer and
other
.override -
modInverse(
unsigned modulus) → i8 -
Returns the modular multiplicative inverse of this integer
modulo
modulus
.override -
modPow(
unsigned exponent, unsigned modulus) → i8 -
Returns this integer to the power of
exponent
modulomodulus
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remainder(
dynamic other) → i8 -
The remainder of the truncating division of
this
byother
.override -
roundToDouble(
) → double -
Returns
this.toDouble()
.inherited -
toRadixString(
int radix) → String -
Converts this to a string representation in the given
radix
.inherited -
toString(
) → String -
Returns a string representation of this integer.
inherited
-
truncateToDouble(
) → double -
Returns
this.toDouble()
.inherited
Operators
-
operator %(
dynamic other) → i8 -
Euclidean modulo of this number by
other
.override -
operator &(
dynamic other) → i8 -
Bit-wise and operator.
override
-
operator *(
dynamic other) → i8 -
Multiplies this integer by
other
.override -
operator +(
dynamic other) → i8 -
Adds
other
to this number.override -
operator -(
dynamic other) → i8 -
Subtracts
other
from this number.override -
operator /(
dynamic other) → double -
Divides this number by
other
.inherited -
operator <(
dynamic other) → bool -
Whether this number is numerically smaller than
other
.inherited -
operator <<(
dynamic other) → i8 -
Shift the bits of this integer to the left by
shiftAmount
.override -
operator <=(
dynamic other) → bool -
Whether this number is numerically smaller than or equal to
other
.inherited -
operator ==(
Object other) → bool -
Test whether this value is numerically equal to other.
inherited
-
operator >(
dynamic other) → bool -
Whether this number is numerically greater than
other
.inherited -
operator >=(
dynamic other) → bool -
Whether this number is numerically greater than or equal to
other
.inherited -
operator >>(
dynamic other) → i8 -
Shift the bits of this integer to the right by
shiftAmount
.override -
operator >>>(
dynamic other) → i8 -
Bitwise unsigned right shift by
shiftAmount
bits.override -
operator ^(
dynamic other) → i8 -
Bit-wise exclusive-or operator.
override
-
operator unary-(
) → i8 -
Return the negative value of this integer.
override
-
operator |(
dynamic other) → i8 -
Bit-wise or operator.
override
-
operator ~(
) → i8 -
The bit-wise negate operator.
override
-
operator ~/(
dynamic other) → i8 -
Truncating division operator.
override