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

Unified Diff: pkg/unmodifiable_collection/lib/unmodifiable_collection.dart

Issue 25931003: Make List.shuffle take an optional Random object to use. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/third_party/html5lib/lib/src/list_proxy.dart ('k') | runtime/lib/array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unmodifiable_collection/lib/unmodifiable_collection.dart
diff --git a/pkg/unmodifiable_collection/lib/unmodifiable_collection.dart b/pkg/unmodifiable_collection/lib/unmodifiable_collection.dart
index 2388ccb845ed3f02006de71a02bba908fb012088..ec8dbf01f9085463f2748ec0c4031ce8b2e3ca26 100644
--- a/pkg/unmodifiable_collection/lib/unmodifiable_collection.dart
+++ b/pkg/unmodifiable_collection/lib/unmodifiable_collection.dart
@@ -13,6 +13,7 @@
*/
library unmodifiable_collection;
+import "dart:math" show Random;
export "dart:collection" show UnmodifiableListView;
/**
@@ -58,7 +59,7 @@ class NonGrowableListView<E> extends _IterableView<E>
void sort([int compare(E a, E b)]) { _source.sort(compare); }
- void shuffle() { _source.shuffle(); }
+ void shuffle([Random random]) { _source.shuffle(random); }
void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
_source.setRange(start, end, iterable, skipCount);
« no previous file with comments | « pkg/third_party/html5lib/lib/src/list_proxy.dart ('k') | runtime/lib/array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698