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

Side by Side Diff: sdk/lib/core/collection.dart

Issue 12049065: Fix bugs in GrowableList.remove*. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 /** 79 /**
80 * Removes all elements of this collection that fail to satisfy [test]. 80 * Removes all elements of this collection that fail to satisfy [test].
81 * 81 *
82 * An elements [:e:] satisfies [test] if [:test(e):] is true. 82 * An elements [:e:] satisfies [test] if [:test(e):] is true.
83 */ 83 */
84 void retainMatching(bool test(E element)) { 84 void retainMatching(bool test(E element)) {
85 IterableMixinWorkaround.retainMatching(this, test); 85 IterableMixinWorkaround.retainMatching(this, test);
86 } 86 }
87
88 /**
89 * Removes all elements of this collection.
90 */
91 void clear() {
92 IterableMixinWorkaround.removeMatching((E e) => true);
93 }
87 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698