| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 class StringUtils { | 213 class StringUtils { |
| 214 static List<String> split(String s, [String pattern = '']) => s.split(pattern)
; | 214 static List<String> split(String s, [String pattern = '']) => s.split(pattern)
; |
| 215 static String replace(String s, String from, String to) => s.replaceAll(from,
to); | 215 static String replace(String s, String from, String to) => s.replaceAll(from,
to); |
| 216 static String repeat(String s, int n) { | 216 static String repeat(String s, int n) { |
| 217 StringBuffer sb = new StringBuffer(); | 217 StringBuffer sb = new StringBuffer(); |
| 218 for (int i = 0; i < n; i++) { | 218 for (int i = 0; i < n; i++) { |
| 219 sb.write(s); | 219 sb.write(s); |
| 220 } | 220 } |
| 221 return sb.toString(); | 221 return sb.toString(); |
| 222 } | 222 } |
| 223 static String join(Iterable iter, [String separator = " "]) { |
| 224 return iter.join(separator); |
| 225 } |
| 223 } | 226 } |
| 224 | 227 |
| 225 class Math { | 228 class Math { |
| 226 static num max(num a, num b) => math.max(a, b); | 229 static num max(num a, num b) => math.max(a, b); |
| 227 static num min(num a, num b) => math.min(a, b); | 230 static num min(num a, num b) => math.min(a, b); |
| 228 } | 231 } |
| 229 | 232 |
| 230 class RuntimeException extends JavaException { | 233 class RuntimeException extends JavaException { |
| 231 RuntimeException({String message: "", Exception cause: null}) : | 234 RuntimeException({String message: "", Exception cause: null}) : |
| 232 super(message, cause); | 235 super(message, cause); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 250 | 253 |
| 251 class StringIndexOutOfBoundsException extends JavaException { | 254 class StringIndexOutOfBoundsException extends JavaException { |
| 252 StringIndexOutOfBoundsException(int index) : super('$index'); | 255 StringIndexOutOfBoundsException(int index) : super('$index'); |
| 253 } | 256 } |
| 254 | 257 |
| 255 class IllegalStateException extends JavaException { | 258 class IllegalStateException extends JavaException { |
| 256 IllegalStateException([message = ""]) : super(message); | 259 IllegalStateException([message = ""]) : super(message); |
| 257 } | 260 } |
| 258 | 261 |
| 259 class UnsupportedOperationException extends JavaException { | 262 class UnsupportedOperationException extends JavaException { |
| 260 String toString() => "UnsupportedOperationException"; | 263 UnsupportedOperationException([message = ""]) : super(message); |
| 261 } | 264 } |
| 262 | 265 |
| 263 class NoSuchElementException extends JavaException { | 266 class NoSuchElementException extends JavaException { |
| 264 String toString() => "NoSuchElementException"; | 267 String toString() => "NoSuchElementException"; |
| 265 } | 268 } |
| 266 | 269 |
| 267 class NumberFormatException extends JavaException { | 270 class NumberFormatException extends JavaException { |
| 268 String toString() => "NumberFormatException"; | 271 String toString() => "NumberFormatException"; |
| 269 } | 272 } |
| 270 | 273 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 if (!_matches.moveNext()) { | 444 if (!_matches.moveNext()) { |
| 442 return false; | 445 return false; |
| 443 } | 446 } |
| 444 _match = _matches.current; | 447 _match = _matches.current; |
| 445 return true; | 448 return true; |
| 446 } | 449 } |
| 447 String group(int i) => _match[i]; | 450 String group(int i) => _match[i]; |
| 448 int start() => _match.start; | 451 int start() => _match.start; |
| 449 int end() => _match.end; | 452 int end() => _match.end; |
| 450 } | 453 } |
| OLD | NEW |