Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: lib/src/intx.dart

Issue 1963283002: Fix parameter types for compareTo(). (Closed) Base URL: https://github.com/dart-lang/fixnum@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/int64.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « lib/src/int64.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698