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

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

Issue 2548433002: Don't use [operator==] to refer to [==] in DartDoc. It doesn't work. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « sdk/lib/collection/linked_hash_set.dart ('k') | sdk/lib/collection/splay_tree.dart » ('j') | 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 * Base class for implementing a [Map]. 8 * Base class for implementing a [Map].
9 * 9 *
10 * This class has a basic implementation of all but five of the members of 10 * This class has a basic implementation of all but five of the members of
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 * 207 *
208 * A wrapper around a `Map` that forwards all members to the map provided in 208 * A wrapper around a `Map` that forwards all members to the map provided in
209 * the constructor, except for operations that modify the map. 209 * the constructor, except for operations that modify the map.
210 * Modifying operations throw instead. 210 * Modifying operations throw instead.
211 */ 211 */
212 class UnmodifiableMapView<K, V> = 212 class UnmodifiableMapView<K, V> =
213 MapView<K, V> with _UnmodifiableMapMixin<K, V>; 213 MapView<K, V> with _UnmodifiableMapMixin<K, V>;
214 214
215 /** 215 /**
216 * Helper class which implements complex [Map] operations 216 * Helper class which implements complex [Map] operations
217 * in term of basic ones ([Map.keys], [Map.operator []], 217 * in term of basic ones ([Map.keys], [Map.[]],
218 * [Map.operator []=] and [Map.remove].) Not all methods are 218 * [Map.[]=] and [Map.remove].) Not all methods are
219 * necessary to implement each particular operation. 219 * necessary to implement each particular operation.
220 */ 220 */
221 class Maps { 221 class Maps {
222 static bool containsValue(Map map, Object value) { 222 static bool containsValue(Map map, Object value) {
223 for (final v in map.values) { 223 for (final v in map.values) {
224 if (v == value) { 224 if (v == value) {
225 return true; 225 return true;
226 } 226 }
227 } 227 }
228 return false; 228 return false;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 map[keyIterator.current] = valueIterator.current; 345 map[keyIterator.current] = valueIterator.current;
346 hasNextKey = keyIterator.moveNext(); 346 hasNextKey = keyIterator.moveNext();
347 hasNextValue = valueIterator.moveNext(); 347 hasNextValue = valueIterator.moveNext();
348 } 348 }
349 349
350 if (hasNextKey || hasNextValue) { 350 if (hasNextKey || hasNextValue) {
351 throw new ArgumentError("Iterables do not have same length."); 351 throw new ArgumentError("Iterables do not have same length.");
352 } 352 }
353 } 353 }
354 } 354 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/linked_hash_set.dart ('k') | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698