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

Unified Diff: pkg/unmodifiable_collection/lib/unmodifiable_collection.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 | « 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 b94a0c46c0f8331b38fa6a8fae36a746ebcdc2da..2388ccb845ed3f02006de71a02bba908fb012088 100644
--- a/pkg/unmodifiable_collection/lib/unmodifiable_collection.dart
+++ b/pkg/unmodifiable_collection/lib/unmodifiable_collection.dart
@@ -54,11 +54,12 @@ class NonGrowableListView<E> extends _IterableView<E>
Map<int, E> asMap() => _source.asMap();
-
void operator []=(int index, E value) { _source[index] = value; }
void sort([int compare(E a, E b)]) { _source.sort(compare); }
+ void shuffle() { _source.shuffle(); }
+
void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
_source.setRange(start, end, iterable, skipCount);
}
@@ -154,7 +155,7 @@ class NonGrowableListView<E> extends _IterableView<E>
/**
* An unmodifiable set.
*
- * An UnmodifiableSetView contains a [Set] object and ensures
+ * An UnmodifiableSetView contains a [Set] object and ensures
* that it does not change.
* Methods that would change the set,
* such as [add] and [remove], throw an [UnsupportedError].
@@ -230,7 +231,7 @@ class UnmodifiableSetView<E> extends _IterableView<E>
/**
* An unmodifiable map.
*
- * An UnmodifiableMapView contains a [Map] object and ensures
+ * An UnmodifiableMapView contains a [Map] object and ensures
* that it does not change.
* Methods that would change the map,
* such as [addAll] and [remove], throw an [UnsupportedError].
« 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