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

Unified Diff: runtime/lib/array.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 | « pkg/serialization/lib/src/serialization_rule.dart ('k') | runtime/lib/byte_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index 7caac16c243530ea8fcd43558853df47e3634b7f..165ba64812fe23e8c34f4db3210345b0c9ec585f 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -29,6 +29,31 @@ class _ObjectArray<E> implements List<E> {
"Cannot remove element of a non-extendable array");
}
+ void remove(Object element) {
+ throw new UnsupportedError(
+ "Cannot remove element of a non-extendable array");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove element of a non-extendable array");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove element of a non-extendable array");
+ }
+
+ void removeMatching(bool test(E element)) {
+ throw new UnsupportedError(
+ "Cannot remove element of a non-extendable array");
+ }
+
+ void retainMatching(bool test(E element)) {
+ throw new UnsupportedError(
+ "Cannot remove element of a non-extendable array");
+ }
+
void setRange(int start, int length, List<E> from, [int startFrom = 0]) {
if (length < 0) {
throw new ArgumentError("negative length $length");
@@ -234,6 +259,31 @@ class _ImmutableArray<E> implements List<E> {
"Cannot modify an immutable array");
}
+ void remove(Object element) {
+ throw new UnsupportedError(
+ "Cannot modify an immutable array");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot modify an immutable array");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot modify an immutable array");
+ }
+
+ void removeMatching(bool test(E element)) {
+ throw new UnsupportedError(
+ "Cannot modify an immutable array");
+ }
+
+ void retainMatching(bool test(E element)) {
+ throw new UnsupportedError(
+ "Cannot modify an immutable array");
+ }
+
void copyFrom(List src, int srcStart, int dstStart, int count) {
throw new UnsupportedError(
"Cannot modify an immutable array");
« no previous file with comments | « pkg/serialization/lib/src/serialization_rule.dart ('k') | runtime/lib/byte_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698