| 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 class JavaSystem { | 7 class JavaSystem { |
| 8 static int currentTimeMillis() { | 8 static int currentTimeMillis() { |
| 9 return (new DateTime.now()).millisecondsSinceEpoch; | 9 return (new DateTime.now()).millisecondsSinceEpoch; |
| 10 } | 10 } |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 void clear() { | 414 void clear() { |
| 415 sb = new StringBuffer(); | 415 sb = new StringBuffer(); |
| 416 } | 416 } |
| 417 } | 417 } |
| 418 | 418 |
| 419 abstract class Enum<E extends Enum> implements Comparable<E> { | 419 abstract class Enum<E extends Enum> implements Comparable<E> { |
| 420 /// The name of this enum constant, as declared in the enum declaration. | 420 /// The name of this enum constant, as declared in the enum declaration. |
| 421 final String name; | 421 final String name; |
| 422 /// The position in the enum declaration. | 422 /// The position in the enum declaration. |
| 423 final int ordinal; | 423 final int ordinal; |
| 424 const Enum(this.name, this.ordinal); | 424 Enum(this.name, this.ordinal); |
| 425 int get hashCode => ordinal; | 425 int get hashCode => ordinal; |
| 426 String toString() => name; | 426 String toString() => name; |
| 427 int compareTo(E other) => ordinal - other.ordinal; | 427 int compareTo(E other) => ordinal - other.ordinal; |
| 428 } | 428 } |
| 429 | 429 |
| 430 class JavaPatternMatcher { | 430 class JavaPatternMatcher { |
| 431 Iterator<Match> _matches; | 431 Iterator<Match> _matches; |
| 432 Match _match; | 432 Match _match; |
| 433 JavaPatternMatcher(RegExp re, String input) { | 433 JavaPatternMatcher(RegExp re, String input) { |
| 434 _matches = re.allMatches(input).iterator; | 434 _matches = re.allMatches(input).iterator; |
| 435 } | 435 } |
| 436 bool find() { | 436 bool find() { |
| 437 if (!_matches.moveNext()) { | 437 if (!_matches.moveNext()) { |
| 438 return false; | 438 return false; |
| 439 } | 439 } |
| 440 _match = _matches.current; | 440 _match = _matches.current; |
| 441 return true; | 441 return true; |
| 442 } | 442 } |
| 443 String group(int i) => _match[i]; | 443 String group(int i) => _match[i]; |
| 444 int start() => _match.start; | 444 int start() => _match.start; |
| 445 int end() => _match.end; | 445 int end() => _match.end; |
| 446 } | 446 } |
| OLD | NEW |