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

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

Issue 24740003: Add List.shuffle(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adddress comments Created 7 years, 2 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
« no previous file with comments | « no previous file | pkg/analyzer_experimental/lib/src/generated/java_core.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:collection" show ListBase; 4 import "dart:collection" show ListBase;
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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 369 }
370 370
371 void setAll(int index, Iterable<E> iterable) { 371 void setAll(int index, Iterable<E> iterable) {
372 elements.setAll(index, iterable); 372 elements.setAll(index, iterable);
373 } 373 }
374 374
375 void sort([int compare(E a, E b)]) { 375 void sort([int compare(E a, E b)]) {
376 elements.sort(compare); 376 elements.sort(compare);
377 } 377 }
378 378
379 void shuffle() {
380 elements.shuffle();
381 }
382
379 int indexOf(E element, [int start = 0]) { 383 int indexOf(E element, [int start = 0]) {
380 return elements.indexOf(element, start); 384 return elements.indexOf(element, start);
381 } 385 }
382 386
383 void insert(int index, E element) { 387 void insert(int index, E element) {
384 elements.insert(index, element); 388 elements.insert(index, element);
385 } 389 }
386 390
387 void insertAll(int index, Iterable<E> iterable) { 391 void insertAll(int index, Iterable<E> iterable) {
388 elements.insertAll(index, iterable); 392 elements.insertAll(index, iterable);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 bool find() { 580 bool find() {
577 if (!_matches.moveNext()) { 581 if (!_matches.moveNext()) {
578 return false; 582 return false;
579 } 583 }
580 _match = _matches.current; 584 _match = _matches.current;
581 return true; 585 return true;
582 } 586 }
583 String group(int i) => _match[i]; 587 String group(int i) => _match[i];
584 int start() => _match.start; 588 int start() => _match.start;
585 int end() => _match.end; 589 int end() => _match.end;
586 } 590 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_experimental/lib/src/generated/java_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698