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

Unified Diff: sdk/lib/core/collection.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
« no previous file with comments | « sdk/lib/collection/queue.dart ('k') | sdk/lib/core/core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/collection.dart
diff --git a/sdk/lib/core/collection.dart b/sdk/lib/core/collection.dart
deleted file mode 100644
index 6a725a1b84cda27aa8d246ae139f4b7913c854bd..0000000000000000000000000000000000000000
--- a/sdk/lib/core/collection.dart
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart.core;
-
-/**
- * A collection of individual elements.
- *
- * A [Collection] contains some elements in a structure optimized
- * for certain operations. Different collections are optimized for different
- * uses.
- *
- * A collection can be updated by adding or removing elements.
- *
- * Collections are [Iterable]. The order of iteration is defined by
- * each type of collection.
- *
- * *Deprecated*: This class is deprecated and will be removed soon.
- */
-abstract class Collection<E> extends Iterable<E> {
- const Collection();
-
- /**
- * Adds an element to this collection.
- */
- void add(E element);
-
- /**
- * Adds all of [elements] to this collection.
- *
- * Equivalent to adding each element in [elements] using [add],
- * but some collections may be able to optimize it.
- */
- void addAll(Iterable<E> elements) {
- for (E element in elements) {
- add(element);
- }
- }
-
- /**
- * Removes an instance of [element] from this collection.
- *
- * This removes only one instance of the element for collections that can
- * contain the same element more than once (e.g., [List]). Which instance
- * is removed is decided by the collection.
- *
- * Has no effect if the elements is not in this collection.
- */
- void remove(Object element);
-
- /**
- * Removes all of [elements] from this collection.
- *
- * Equivalent to calling [remove] once for each element in
- * [elements], but may be faster for some collections.
- */
- void removeAll(Iterable elements) {
- IterableMixinWorkaround.removeAll(this, elements);
- }
-
- /**
- * Removes all elements of this collection that are not
- * in [elements].
- *
- * For [Set]s, this is the intersection of the two original sets.
- */
- void retainAll(Iterable elements) {
- IterableMixinWorkaround.retainAll(this, elements);
- }
-
- /**
- * Removes all elements of this collection that satisfy [test].
- *
- * An elements [:e:] satisfies [test] if [:test(e):] is true.
- */
- void removeWhere(bool test(E element)) {
- IterableMixinWorkaround.removeWhere(this, test);
- }
-
- /**
- * Removes all elements of this collection that fail to satisfy [test].
- *
- * An elements [:e:] satisfies [test] if [:test(e):] is true.
- */
- void retainWhere(bool test(E element)) {
- IterableMixinWorkaround.retainWhere(this, test);
- }
-
- /**
- * Removes all elements of this collection.
- */
- void clear() {
- IterableMixinWorkaround.removeWhere(this, (E e) => true);
- }
-}
« no previous file with comments | « sdk/lib/collection/queue.dart ('k') | sdk/lib/core/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698