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

Unified Diff: sdk/lib/core/list.dart

Issue 11931034: Add methods to Collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 11 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 | « sdk/lib/core/collection.dart ('k') | sdk/lib/core/queue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/list.dart
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index a2c299aceea1c9e9c9a269cb07eface79834812a..062a0d9cfa7e947082ddd57d44ce5daa3ee54887 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -304,6 +304,26 @@ abstract class NonExtensibleListMixin<E>
"Cannot add to an unmodifiable list");
}
+ void remove(E element) {
+ throw new UnsupportedError(
+ "Cannot remove from an unmodifiable list");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from an unmodifiable list");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from an unmodifiable list");
+ }
+
+ void removeMatching(bool test(E element)) {
+ throw new UnsupportedError(
+ "Cannot remove from an unmodifiable list");
+ }
+
void sort([Comparator<E> compare]) {
throw new UnsupportedError(
"Cannot modify an unmodifiable list");
@@ -316,12 +336,12 @@ abstract class NonExtensibleListMixin<E>
E removeAt(int index) {
throw new UnsupportedError(
- "Cannot remove in an unmodifiable list");
+ "Cannot remove from an unmodifiable list");
}
E removeLast() {
throw new UnsupportedError(
- "Cannot remove in an unmodifiable list");
+ "Cannot remove from an unmodifiable list");
}
void setRange(int start, int length, List<E> from, [int startFrom]) {
@@ -331,7 +351,7 @@ abstract class NonExtensibleListMixin<E>
void removeRange(int start, int length) {
throw new UnsupportedError(
- "Cannot remove in an unmodifiable list");
+ "Cannot remove from an unmodifiable list");
}
void insertRange(int start, int length, [E initialValue]) {
« no previous file with comments | « sdk/lib/core/collection.dart ('k') | sdk/lib/core/queue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698