| 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 dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * An arbitrarily large integer. | 8 * An arbitrarily large integer. |
| 9 * | 9 * |
| 10 * **Note:** When compiling to JavaScript, integers are | 10 * **Note:** When compiling to JavaScript, integers are |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 * Shift the bits of this integer to the right by [shiftAmount]. | 96 * Shift the bits of this integer to the right by [shiftAmount]. |
| 97 * | 97 * |
| 98 * Shifting to the right makes the number smaller and drops the least | 98 * Shifting to the right makes the number smaller and drops the least |
| 99 * significant bits, effectively doing an integer division by | 99 * significant bits, effectively doing an integer division by |
| 100 *`pow(2, shiftIndex)`. | 100 *`pow(2, shiftIndex)`. |
| 101 * | 101 * |
| 102 * It is an error of [shiftAmount] is negative. | 102 * It is an error of [shiftAmount] is negative. |
| 103 */ | 103 */ |
| 104 int operator >>(int shiftAmount); | 104 int operator >>(int shiftAmount); |
| 105 | 105 |
| 106 /** |
| 107 * Returns this integer to the power of [exponent] modulo [modulus]. |
| 108 * |
| 109 * The [exponent] must be non-negative and [modulus] must be |
| 110 * positive. |
| 111 */ |
| 112 int modPow(int exponent, int modulus); |
| 113 |
| 106 /** Returns true if and only if this integer is even. */ | 114 /** Returns true if and only if this integer is even. */ |
| 107 bool get isEven; | 115 bool get isEven; |
| 108 | 116 |
| 109 /** Returns true if and only if this integer is odd. */ | 117 /** Returns true if and only if this integer is odd. */ |
| 110 bool get isOdd; | 118 bool get isOdd; |
| 111 | 119 |
| 112 /** | 120 /** |
| 113 * Returns the minimum number of bits required to store this integer. | 121 * Returns the minimum number of bits required to store this integer. |
| 114 * | 122 * |
| 115 * The number of bits excludes the sign bit, which gives the natural length | 123 * The number of bits excludes the sign bit, which gives the natural length |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 * value is used instead. If no [onError] is provided, a [FormatException] | 277 * value is used instead. If no [onError] is provided, a [FormatException] |
| 270 * is thrown. | 278 * is thrown. |
| 271 * | 279 * |
| 272 * The [onError] function is only invoked if [source] is a [String]. It is | 280 * The [onError] function is only invoked if [source] is a [String]. It is |
| 273 * not invoked if the [source] is, for example, `null`. | 281 * not invoked if the [source] is, for example, `null`. |
| 274 */ | 282 */ |
| 275 external static int parse(String source, | 283 external static int parse(String source, |
| 276 { int radix, | 284 { int radix, |
| 277 int onError(String source) }); | 285 int onError(String source) }); |
| 278 } | 286 } |
| OLD | NEW |