| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A collection of individual elements. | 8 * A collection of individual elements. |
| 9 * | 9 * |
| 10 * A [Collection] contains some elements in a structure optimized | 10 * A [Collection] contains some elements in a structure optimized |
| 11 * for certain operations. Different collections are optimized for different | 11 * for certain operations. Different collections are optimized for different |
| 12 * uses. | 12 * uses. |
| 13 * | 13 * |
| 14 * A collection can be updated by adding or removing elements. | 14 * A collection can be updated by adding or removing elements. |
| 15 * | 15 * |
| 16 * Collections are [Iterable]. The order of iteration is defined by | 16 * Collections are [Iterable]. The order of iteration is defined by |
| 17 * each type of collection. | 17 * each type of collection. |
| 18 */ | 18 */ |
| 19 @deprecated |
| 19 abstract class Collection<E> extends Iterable<E> { | 20 abstract class Collection<E> extends Iterable<E> { |
| 20 const Collection(); | 21 const Collection(); |
| 21 | 22 |
| 22 /** | 23 /** |
| 23 * Adds an element to this collection. | 24 * Adds an element to this collection. |
| 24 */ | 25 */ |
| 25 void add(E element); | 26 void add(E element); |
| 26 | 27 |
| 27 /** | 28 /** |
| 28 * Adds all of [elements] to this collection. | 29 * Adds all of [elements] to this collection. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 IterableMixinWorkaround.retainWhere(this, test); | 86 IterableMixinWorkaround.retainWhere(this, test); |
| 86 } | 87 } |
| 87 | 88 |
| 88 /** | 89 /** |
| 89 * Removes all elements of this collection. | 90 * Removes all elements of this collection. |
| 90 */ | 91 */ |
| 91 void clear() { | 92 void clear() { |
| 92 IterableMixinWorkaround.removeWhere(this, (E e) => true); | 93 IterableMixinWorkaround.removeWhere(this, (E e) => true); |
| 93 } | 94 } |
| 94 } | 95 } |
| OLD | NEW |