| OLD | NEW |
| 1 library java.core; | 1 library java.core; |
| 2 | 2 |
| 3 import "dart:math" as math; | 3 import "dart:math" as math; |
| 4 | 4 |
| 5 final Stopwatch nanoTimeStopwatch = new Stopwatch(); | 5 final Stopwatch nanoTimeStopwatch = new Stopwatch(); |
| 6 | 6 |
| 7 const int LONG_MAX_VALUE = 0x7fffffffffffffff; | 7 const int LONG_MAX_VALUE = 0x7fffffffffffffff; |
| 8 | 8 |
| 9 class JavaSystem { | 9 class JavaSystem { |
| 10 static int currentTimeMillis() { | 10 static int currentTimeMillis() { |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 class RuntimeException extends JavaException { | 290 class RuntimeException extends JavaException { |
| 291 RuntimeException({String message: "", Exception cause: null}) : | 291 RuntimeException({String message: "", Exception cause: null}) : |
| 292 super(message, cause); | 292 super(message, cause); |
| 293 } | 293 } |
| 294 | 294 |
| 295 class JavaException implements Exception { | 295 class JavaException implements Exception { |
| 296 final String message; | 296 final String message; |
| 297 final Exception cause; | 297 final Exception cause; |
| 298 JavaException([this.message = "", this.cause = null]); | 298 JavaException([this.message = "", this.cause = null]); |
| 299 JavaException.withCause(this.cause) : message = null; | 299 JavaException.withCause(this.cause) : message = null; |
| 300 String toString() => "${runtimeType}: $message $cause"; | 300 String toString() => "$runtimeType: $message $cause"; |
| 301 } | 301 } |
| 302 | 302 |
| 303 class JavaIOException extends JavaException { | 303 class JavaIOException extends JavaException { |
| 304 JavaIOException([message = "", cause = null]) : super(message, cause); | 304 JavaIOException([message = "", cause = null]) : super(message, cause); |
| 305 } | 305 } |
| 306 | 306 |
| 307 class IllegalArgumentException extends JavaException { | 307 class IllegalArgumentException extends JavaException { |
| 308 IllegalArgumentException([message = "", cause = null]) : super(message, cause)
; | 308 IllegalArgumentException([message = "", cause = null]) : super(message, cause)
; |
| 309 } | 309 } |
| 310 | 310 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 * format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?' | 456 * format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?' |
| 457 */ | 457 */ |
| 458 String formatList(String pattern, List args) { | 458 String formatList(String pattern, List args) { |
| 459 return pattern.replaceAllMapped(new RegExp(r'\{(\d+)\}'), (match) { | 459 return pattern.replaceAllMapped(new RegExp(r'\{(\d+)\}'), (match) { |
| 460 String indexStr = match.group(1); | 460 String indexStr = match.group(1); |
| 461 int index = int.parse(indexStr); | 461 int index = int.parse(indexStr); |
| 462 var arg = args[index]; | 462 var arg = args[index]; |
| 463 return arg != null ? arg.toString() : null; | 463 return arg != null ? arg.toString() : null; |
| 464 }); | 464 }); |
| 465 } | 465 } |
| OLD | NEW |