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

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

Issue 12051041: Fix typo. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.collection; 5 part of dart.collection;
6 6
7 /** 7 /**
8 * This class provides default implementations for Iterables (including Lists). 8 * This class provides default implementations for Iterables (including Lists).
9 * 9 *
10 * Once Dart receives Mixins it will be replaced with mixin classes. 10 * Once Dart receives Mixins it will be replaced with mixin classes.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 * instead of just repeatedly calling remove. 67 * instead of just repeatedly calling remove.
68 */ 68 */
69 static void removeAllList(Collection collection, Iterable elementsToRemove) { 69 static void removeAllList(Collection collection, Iterable elementsToRemove) {
70 Set setToRemove; 70 Set setToRemove;
71 // Assume contains is efficient on a Set. 71 // Assume contains is efficient on a Set.
72 if (elementsToRemove is Set) { 72 if (elementsToRemove is Set) {
73 setToRemove = elementsToRemove; 73 setToRemove = elementsToRemove;
74 } else { 74 } else {
75 setToRemove = elementsToRemove.toSet(); 75 setToRemove = elementsToRemove.toSet();
76 } 76 }
77 collection.removeMatching(setToRemve.contains); 77 collection.removeMatching(setToRemove.contains);
78 } 78 }
79 79
80 /** 80 /**
81 * Simple implemenation for [Collection.retainAll]. 81 * Simple implemenation for [Collection.retainAll].
82 * 82 *
83 * This implementation assumes that [Collecton.retainMatching] on [collection] 83 * This implementation assumes that [Collecton.retainMatching] on [collection]
84 * is efficient. 84 * is efficient.
85 */ 85 */
86 static void retainAll(Collection collection, Iterable elementsToRetain) { 86 static void retainAll(Collection collection, Iterable elementsToRetain) {
87 Set lookup; 87 Set lookup;
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 * Returns true if the specified collection contains the specified object 516 * Returns true if the specified collection contains the specified object
517 * reference. 517 * reference.
518 */ 518 */
519 static _containsRef(Collection c, Object ref) { 519 static _containsRef(Collection c, Object ref) {
520 for (var e in c) { 520 for (var e in c) {
521 if (identical(e, ref)) return true; 521 if (identical(e, ref)) return true;
522 } 522 }
523 return false; 523 return false;
524 } 524 }
525 } 525 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698