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

Side by Side Diff: samples/ui_lib/util/CollectionUtils.dart

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. 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
« no previous file with comments | « samples/ui_lib/observable/EventBatch.dart ('k') | tests/co19/co19-dart2dart.status » ('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) 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 typedef num NumericValueSelector<T>(T value); 5 typedef num NumericValueSelector<T>(T value);
6 6
7 /** 7 /**
8 * General purpose collection utilities. 8 * General purpose collection utilities.
9 * TODO(jmesserly): make these top level functions? 9 * TODO(jmesserly): make these top level functions?
10 */ 10 */
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 do { 125 do {
126 total += iter.next(); 126 total += iter.next();
127 } while (iter.hasNext); 127 } while (iter.hasNext);
128 } 128 }
129 return total; 129 return total;
130 } 130 }
131 131
132 // TODO(jmesserly): something like should exist on Map, either a method or a 132 // TODO(jmesserly): something like should exist on Map, either a method or a
133 // constructor, see bug #5340679 133 // constructor, see bug #5340679
134 static void copyMap(Map dest, Map source) { 134 static void copyMap(Map dest, Map source) {
135 for (final k in source.getKeys()) { 135 for (final k in source.keys) {
136 dest[k] = source[k]; 136 dest[k] = source[k];
137 } 137 }
138 } 138 }
139 } 139 }
OLDNEW
« no previous file with comments | « samples/ui_lib/observable/EventBatch.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698