Chromium Code Reviews| Index: pkg/fixnum/lib/src/intx.dart |
| diff --git a/pkg/fixnum/lib/src/intx.dart b/pkg/fixnum/lib/src/intx.dart |
| index 582fe7246e7ba9486f2d5475edd82002615341f7..0c7d5cb9c06a6307e9a73248fb32e7645bc487b7 100644 |
| --- a/pkg/fixnum/lib/src/intx.dart |
| +++ b/pkg/fixnum/lib/src/intx.dart |
| @@ -7,32 +7,32 @@ part of fixnum; |
| /** |
| * A fixed-precision integer. |
| */ |
| -abstract class intx implements Comparable { |
| +abstract class Intx implements Comparable { |
|
justinfagnani
2013/07/29 20:15:13
IntX maybe?
Chris Bracken
2013/07/29 20:28:09
Done.
|
| // Arithmetic operations. |
| - intx operator +(other); |
| - intx operator -(other); |
| + Intx operator +(other); |
| + Intx operator -(other); |
| // The unary '-' operator. Note that -MIN_VALUE will be equal |
| // to MIN_VALUE due to overflow. |
| - intx operator -(); |
| - intx operator *(other); |
| - intx operator %(other); |
| + Intx operator -(); |
| + Intx operator *(other); |
| + Intx operator %(other); |
| // Truncating division. |
| - intx operator ~/(other); |
| - intx remainder(other); |
| + Intx operator ~/(other); |
| + Intx remainder(other); |
| // Note: no / operator |
| // Bit-operations. |
| - intx operator &(other); |
| - intx operator |(other); |
| - intx operator ^(other); |
| - intx operator ~(); |
| - intx operator <<(int shiftAmount); |
| - intx operator >>(int shiftAmount); |
| - intx shiftRightUnsigned(int shiftAmount); |
| - |
| - // Relational operations, may be applied to intx or int. |
| + Intx operator &(other); |
| + Intx operator |(other); |
| + Intx operator ^(other); |
| + Intx operator ~(); |
| + Intx operator <<(int shiftAmount); |
| + Intx operator >>(int shiftAmount); |
| + Intx shiftRightUnsigned(int shiftAmount); |
| + |
| + // Relational operations, may be applied to Intx or int. |
| int compareTo(Comparable other); |
| bool operator ==(other); |
| bool operator <(other); |
| @@ -50,55 +50,55 @@ abstract class intx implements Comparable { |
| int get hashCode; |
| - intx abs(); |
| + Intx abs(); |
| /** |
| - * Returns the number of leading zeros in this [intx] as an [int] |
| + * Returns the number of leading zeros in this [Intx] as an [int] |
| * between 0 and 64. |
| */ |
| int numberOfLeadingZeros(); |
| /** |
| - * Returns the number of trailing zeros in this [intx] as an [int] |
| + * Returns the number of trailing zeros in this [Intx] as an [int] |
| * between 0 and 64. |
| */ |
| int numberOfTrailingZeros(); |
| /** |
| - * Converts this [intx] to a [List] of [int], starting with the least |
| + * Converts this [Intx] to a [List] of [int], starting with the least |
| * significant byte. |
| */ |
| List<int> toBytes(); |
| /** |
| - * Converts this [intx] to an [int]. On some platforms, inputs with large |
| + * 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(); |
| /** |
| - * Converts an [intx] to 32 bits. Narrower values are sign extended and |
| + * Converts an [Intx] to 32 bits. Narrower values are sign extended and |
| * wider values have their high bits truncated. |
| */ |
| - int32 toInt32(); |
| + Int32 toInt32(); |
| /** |
| - * Converts an [intx] to 64 bits. |
| + * Converts an [Intx] to 64 bits. |
| */ |
| - int64 toInt64(); |
| + Int64 toInt64(); |
| /** |
| - * Returns the value of this [intx] as a decimal [String]. |
| + * Returns the value of this [Intx] as a decimal [String]. |
| */ |
| String toString(); |
| /** |
| - * Returns the value of this [intx] as a hexadecimal [String]. |
| + * Returns the value of this [Intx] as a hexadecimal [String]. |
| */ |
| String toHexString(); |
| /** |
| - * Returns the value of this [intx] as a [String] in the given radix. |
| + * Returns the value of this [Intx] as a [String] in the given radix. |
| * [radix] must be an integer between 2 and 16, inclusive. |
| */ |
| String toRadixString(int radix); |