Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_experimental/lib/src/generated/java_core.dart » ('j') | runtime/lib/array.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698