integer class abstract

Baseclass for custom bit-width integers

Implemented types
Implementers

Constructors

integer({required int value})
Create an integer value

Properties

hashCode int
The hash code for this object.
getter/setter pairoverride-getter
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
Value of the integer
no setter

Methods

ceilToDouble() double
Returns this.toDouble().
compareTo(integer other) int
Compares this object to another object.
override
floorToDouble() double
Returns this.toDouble().
gcd(integer other) integer
Returns the modular multiplicative inverse of this integer modulo modulus.
modInverse(unsigned modulus) integer
Returns the modular multiplicative inverse of this integer modulo modulus.
modPow(unsigned exponent, unsigned modulus) integer
Returns this integer to the power of exponent modulo modulus.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remainder(dynamic other) integer
The remainder of the truncating division of this by other.
roundToDouble() double
Returns this.toDouble().
toRadixString(int radix) String
Converts this to a string representation in the given radix.
toString() String
Returns a string representation of this integer.
override
truncateToDouble() double
Returns this.toDouble().

Operators

operator %(dynamic other) integer
Euclidean modulo of this number by other.
operator &(dynamic other) integer
Bit-wise and operator.
operator *(dynamic other) integer
Multiplies this integer by other.
operator +(dynamic other) integer
Adds other to this number.
operator -(dynamic other) integer
Subtracts other from this number.
operator /(dynamic other) double
Divides this number by other.
operator <(dynamic other) bool
Whether this number is numerically smaller than other.
operator <<(dynamic other) integer
Shift the bits of this integer to the left by shiftAmount.
operator <=(dynamic other) bool
Whether this number is numerically smaller than or equal to other.
operator ==(Object other) bool
Test whether this value is numerically equal to other.
override
operator >(dynamic other) bool
Whether this number is numerically greater than other.
operator >=(dynamic other) bool
Whether this number is numerically greater than or equal to other.
operator >>(dynamic other) integer
Shift the bits of this integer to the right by shiftAmount.
operator >>>(dynamic other) integer
Bitwise unsigned right shift by shiftAmount bits.
operator ^(dynamic other) integer
Bit-wise exclusive-or operator.
operator unary-() signed
Return the negative value of this integer.
operator |(dynamic other) integer
Bit-wise or operator.
operator ~() signed
The bit-wise negate operator.
operator ~/(dynamic other) integer
Truncating division operator.