| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of fixnum; | 5 part of fixnum; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A fixed-precision integer. | 8 * A fixed-precision integer. |
| 9 */ | 9 */ |
| 10 abstract class IntX implements Comparable { | 10 abstract class IntX implements Comparable<dynamic> { |
| 11 | 11 |
| 12 /** Addition operator. */ | 12 /** Addition operator. */ |
| 13 IntX operator +(other); | 13 IntX operator +(other); |
| 14 | 14 |
| 15 /** Subtraction operator. */ | 15 /** Subtraction operator. */ |
| 16 IntX operator -(other); | 16 IntX operator -(other); |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Negate operator. | 19 * Negate operator. |
| 20 * | 20 * |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 IntX operator >>(int shiftAmount); | 73 IntX operator >>(int shiftAmount); |
| 74 | 74 |
| 75 /** | 75 /** |
| 76 * Unsigned right-shift operator. | 76 * Unsigned right-shift operator. |
| 77 * | 77 * |
| 78 * Returns the result of shifting the bits of this integer by [shiftAmount] | 78 * Returns the result of shifting the bits of this integer by [shiftAmount] |
| 79 * bits to the right. High-order bits are filled with zeros. | 79 * bits to the right. High-order bits are filled with zeros. |
| 80 */ | 80 */ |
| 81 IntX shiftRightUnsigned(int shiftAmount); | 81 IntX shiftRightUnsigned(int shiftAmount); |
| 82 | 82 |
| 83 int compareTo(Comparable other); | 83 int compareTo(other); |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * Returns `true` if and only if [other] is an int or IntX equal in | 86 * Returns `true` if and only if [other] is an int or IntX equal in |
| 87 * value to this integer. | 87 * value to this integer. |
| 88 */ | 88 */ |
| 89 bool operator ==(other); | 89 bool operator ==(other); |
| 90 | 90 |
| 91 /** Relational less than operator. */ | 91 /** Relational less than operator. */ |
| 92 bool operator <(other); | 92 bool operator <(other); |
| 93 | 93 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 */ | 228 */ |
| 229 String toHexString(); | 229 String toHexString(); |
| 230 | 230 |
| 231 /** | 231 /** |
| 232 * Returns a string representing the value of this integer in the given radix. | 232 * Returns a string representing the value of this integer in the given radix. |
| 233 * | 233 * |
| 234 * [radix] must be an integer in the range 2 .. 16, inclusive. | 234 * [radix] must be an integer in the range 2 .. 16, inclusive. |
| 235 */ | 235 */ |
| 236 String toRadixString(int radix); | 236 String toRadixString(int radix); |
| 237 } | 237 } |
| OLD | NEW |