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

Unified Diff: runtime/lib/array.dart

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index 0f10ceb2b541e9a3cbb45015e3080469044183fb..237fdea4c5e236b4a251aba4af80d17cbc4efc86 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -13,7 +13,7 @@ class _ObjectArray<E> implements List<E> {
void operator []=(int index, E value) native "ObjectArray_setIndexed";
String toString() {
- return Collections.collectionToString(this);
+ return ToString.iterableToString(this);
}
int get length native "ObjectArray_getLength";
@@ -39,17 +39,6 @@ class _ObjectArray<E> implements List<E> {
"Cannot remove element of a non-extendable array");
}
- // Collection interface.
- 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 removeWhere(bool test(E element)) {
throw new UnsupportedError(
"Cannot remove element of a non-extendable array");
@@ -286,16 +275,6 @@ class _ImmutableArray<E> implements List<E> {
"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 removeWhere(bool test(E element)) {
throw new UnsupportedError(
"Cannot modify an immutable array");
@@ -425,7 +404,7 @@ class _ImmutableArray<E> implements List<E> {
}
String toString() {
- return Collections.collectionToString(this);
+ return ToString.iterableToString(this);
}
int indexOf(E element, [int start = 0]) {

Powered by Google App Engine
This is Rietveld 408576698