| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 static const int MIN_HIGH_SURROGATE = 0xD800; | 60 static const int MIN_HIGH_SURROGATE = 0xD800; |
| 61 static bool isDigit(int c) { | 61 static bool isDigit(int c) { |
| 62 return c >= 0x30 && c <= 0x39; | 62 return c >= 0x30 && c <= 0x39; |
| 63 } | 63 } |
| 64 static bool isLetter(int c) { | 64 static bool isLetter(int c) { |
| 65 return c >= 0x41 && c <= 0x5A || c >= 0x61 && c <= 0x7A; | 65 return c >= 0x41 && c <= 0x5A || c >= 0x61 && c <= 0x7A; |
| 66 } | 66 } |
| 67 static bool isLetterOrDigit(int c) { | 67 static bool isLetterOrDigit(int c) { |
| 68 return isLetter(c) || isDigit(c); | 68 return isLetter(c) || isDigit(c); |
| 69 } | 69 } |
| 70 static bool isLowerCase(int c) { |
| 71 return c >= 0x61 && c <= 0x7A; |
| 72 } |
| 73 static bool isUpperCase(int c) { |
| 74 return c >= 0x41 && c <= 0x5A; |
| 75 } |
| 76 static int toLowerCase(int c) { |
| 77 if (c >= 0x41 && c <= 0x5A) { |
| 78 return 0x61 + (c - 0x41); |
| 79 } |
| 80 return c; |
| 81 } |
| 82 static int toUpperCase(int c) { |
| 83 if (c >= 0x61 && c <= 0x7A) { |
| 84 return 0x41 + (c - 0x61); |
| 85 } |
| 86 return c; |
| 87 } |
| 70 static bool isWhitespace(int c) { | 88 static bool isWhitespace(int c) { |
| 71 return c == 0x09 || c == 0x20 || c == 0x0A || c == 0x0D; | 89 return c == 0x09 || c == 0x20 || c == 0x0A || c == 0x0D; |
| 72 } | 90 } |
| 73 static int digit(int codePoint, int radix) { | 91 static int digit(int codePoint, int radix) { |
| 74 if (radix != 16) { | 92 if (radix != 16) { |
| 75 throw new ArgumentError("only radix == 16 is supported"); | 93 throw new ArgumentError("only radix == 16 is supported"); |
| 76 } | 94 } |
| 77 if (0x30 <= codePoint && codePoint <= 0x39) { | 95 if (0x30 <= codePoint && codePoint <= 0x39) { |
| 78 return codePoint - 0x30; | 96 return codePoint - 0x30; |
| 79 } | 97 } |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 if (!_matches.moveNext()) { | 462 if (!_matches.moveNext()) { |
| 445 return false; | 463 return false; |
| 446 } | 464 } |
| 447 _match = _matches.current; | 465 _match = _matches.current; |
| 448 return true; | 466 return true; |
| 449 } | 467 } |
| 450 String group(int i) => _match[i]; | 468 String group(int i) => _match[i]; |
| 451 int start() => _match.start; | 469 int start() => _match.start; |
| 452 int end() => _match.end; | 470 int end() => _match.end; |
| 453 } | 471 } |
| OLD | NEW |