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

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

Issue 11274043: Move Arrays, Collections and Maps into a new library, dart:collections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move collection_sources.gypi to lib/collection/. Created 8 years, 1 month 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) 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
floitsch 2012/10/26 12:31:28 See if "part of" already works.
Anders Johnsen 2012/11/12 12:07:13 No support in editor yet.
5 /* 5 /*
6 * Helper class which implements complex [Map] operations 6 * Helper class which implements complex [Map] operations
7 * in term of basic ones ([Map.getKeys], [Map.operator []], 7 * in term of basic ones ([Map.getKeys], [Map.operator []],
8 * [Map.operator []=] and [Map.remove].) Not all methods are 8 * [Map.operator []=] and [Map.remove].) Not all methods are
9 * necessary to implement each particular operation. 9 * necessary to implement each particular operation.
10 */ 10 */
11 class Maps { 11 class Maps {
12 static bool containsValue(Map map, value) { 12 static bool containsValue(Map map, value) {
13 for (final v in map.getValues()) { 13 for (final v in map.getValues()) {
14 if (value == v) { 14 if (value == v) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 first = false; 104 first = false;
105 Collections._emitObject(k, result, visiting); 105 Collections._emitObject(k, result, visiting);
106 result.add(': '); 106 result.add(': ');
107 Collections._emitObject(v, result, visiting); 107 Collections._emitObject(v, result, visiting);
108 }); 108 });
109 109
110 result.add('}'); 110 result.add('}');
111 visiting.removeLast(); 111 visiting.removeLast();
112 } 112 }
113 } 113 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698