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

Unified Diff: runtime/lib/growable_array.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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/typed_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index 812a71abab9938d5ad7668770f8ddf7b244cec35..65815597411b497fb4383a6e81b0a941c2edd232 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -336,6 +336,10 @@ class _GrowableObjectArray<T> implements List<T> {
IterableMixinWorkaround.sortList(this, compare);
}
+ void shuffle() {
+ IterableMixinWorkaround.shuffleList(this);
+ }
+
String toString() {
return IterableMixinWorkaround.toStringIterable(this, '[', ']');
}
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/typed_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698