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 import "dart:collection" show ListBase; | 5 import "dart:collection" show ListBase; |
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 E removeLast() { | 322 E removeLast() { |
323 return elements.removeLast(); | 323 return elements.removeLast(); |
324 } | 324 } |
325 | 325 |
326 Iterable<E> get reversed => elements.reversed; | 326 Iterable<E> get reversed => elements.reversed; |
327 | 327 |
328 List<E> sublist(int start, [int end]) => elements.sublist(start, end); | 328 List<E> sublist(int start, [int end]) => elements.sublist(start, end); |
329 | 329 |
330 List<E> getRange(int start, int length) => sublist(start, start + length); | 330 List<E> getRange(int start, int length) => sublist(start, start + length); |
331 | 331 |
332 void setRange(int start, int length, List<E> from, [int startFrom]) { | 332 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) { |
333 elements.setRange(start, length, from, startFrom); | 333 elements.setRange(start, end, iterable, skipCount); |
334 } | 334 } |
335 | 335 |
336 void removeRange(int start, int length) { | 336 void removeRange(int start, int length) { |
337 elements.removeRange(start, length); | 337 elements.removeRange(start, length); |
338 } | 338 } |
339 | 339 |
340 void insertRange(int start, int length, [E fill]) { | 340 void insertRange(int start, int length, [E fill]) { |
341 elements.insertRange(start, length, fill); | 341 elements.insertRange(start, length, fill); |
342 } | 342 } |
343 | 343 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 440 } |
441 } else if (sb.length > newLength) { | 441 } else if (sb.length > newLength) { |
442 var s = sb.toString().substring(0, newLength); | 442 var s = sb.toString().substring(0, newLength); |
443 sb = new StringBuffer(s); | 443 sb = new StringBuffer(s); |
444 } | 444 } |
445 } | 445 } |
446 void clear() { | 446 void clear() { |
447 sb = new StringBuffer(); | 447 sb = new StringBuffer(); |
448 } | 448 } |
449 } | 449 } |
OLD | NEW |