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

Unified Diff: tools/dom/templates/immutable_list_mixin.darttemplate

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 | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/immutable_list_mixin.darttemplate
diff --git a/tools/dom/templates/immutable_list_mixin.darttemplate b/tools/dom/templates/immutable_list_mixin.darttemplate
index 7fb4cee84beb92514936de5492dcac804ae5859d..b7c8507e7577208db38b9b629e2ff453b3d3a1e3 100644
--- a/tools/dom/templates/immutable_list_mixin.darttemplate
+++ b/tools/dom/templates/immutable_list_mixin.darttemplate
@@ -95,7 +95,7 @@ $if DEFINE_CLEAR
throw new UnsupportedError("Cannot clear immutable List.");
}
$else
- // contains() defined by IDL.
+ // clear() defined by IDL.
$endif
void sort([int compare($E a, $E b)]) {
@@ -131,11 +131,31 @@ $endif
$E max([int compare($E a, $E b)]) => IterableMixinWorkaround.max(this, compare);
$E removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
$E removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test($E element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test($E element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) {
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698