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 import "dart:uri"; | 4 import "dart:uri"; |
5 | 5 |
6 class JavaSystem { | 6 class JavaSystem { |
7 static int currentTimeMillis() { | 7 static int currentTimeMillis() { |
8 return (new DateTime.now()).millisecondsSinceEpoch; | 8 return (new DateTime.now()).millisecondsSinceEpoch; |
9 } | 9 } |
10 | 10 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 E removeAt(int index) { | 310 E removeAt(int index) { |
311 return elements.removeAt(index); | 311 return elements.removeAt(index); |
312 } | 312 } |
313 | 313 |
314 E removeLast() { | 314 E removeLast() { |
315 return elements.removeLast(); | 315 return elements.removeLast(); |
316 } | 316 } |
317 | 317 |
318 Iterable<E> get reversed => elements.reversed; | 318 Iterable<E> get reversed => elements.reversed; |
319 | 319 |
320 List<E> getRange(int start, int length) { | 320 List<E> sublist(int start, [int end]) => elements.sublist(start, end); |
321 return elements.getRange(start, length); | 321 |
322 } | 322 List<E> getRange(int start, int length) => sublist(start, start + length); |
323 | 323 |
324 void setRange(int start, int length, List<E> from, [int startFrom]) { | 324 void setRange(int start, int length, List<E> from, [int startFrom]) { |
325 elements.setRange(start, length, from, startFrom); | 325 elements.setRange(start, length, from, startFrom); |
326 } | 326 } |
327 | 327 |
328 void removeRange(int start, int length) { | 328 void removeRange(int start, int length) { |
329 elements.removeRange(start, length); | 329 elements.removeRange(start, length); |
330 } | 330 } |
331 | 331 |
332 void insertRange(int start, int length, [E fill]) { | 332 void insertRange(int start, int length, [E fill]) { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 } | 428 } |
429 } else if (sb.length > newLength) { | 429 } else if (sb.length > newLength) { |
430 var s = sb.toString().substring(0, newLength); | 430 var s = sb.toString().substring(0, newLength); |
431 sb = new StringBuffer(s); | 431 sb = new StringBuffer(s); |
432 } | 432 } |
433 } | 433 } |
434 void clear() { | 434 void clear() { |
435 sb = new StringBuffer(); | 435 sb = new StringBuffer(); |
436 } | 436 } |
437 } | 437 } |
OLD | NEW |