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

Side by Side Diff: tools/dom/templates/html/impl/impl_Storage.darttemplate

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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) 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 $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 /** 7 /**
8 * The type used by the 8 * The type used by the
9 * [Window.localStorage] and [Window.sessionStorage] properties. 9 * [Window.localStorage] and [Window.sessionStorage] properties.
10 * Storage is implemented as a Map<String, String>. 10 * Storage is implemented as a Map<String, String>.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void forEach(void f(String key, String value)) { 57 void forEach(void f(String key, String value)) {
58 for (var i = 0; true; i++) { 58 for (var i = 0; true; i++) {
59 final key = $dom_key(i); 59 final key = $dom_key(i);
60 if (key == null) return; 60 if (key == null) return;
61 61
62 f(key, this[key]); 62 f(key, this[key]);
63 } 63 }
64 } 64 }
65 65
66 Collection<String> get keys { 66 Iterable<String> get keys {
67 final keys = []; 67 final keys = [];
68 forEach((k, v) => keys.add(k)); 68 forEach((k, v) => keys.add(k));
69 return keys; 69 return keys;
70 } 70 }
71 71
72 Collection<String> get values { 72 Iterable<String> get values {
73 final values = []; 73 final values = [];
74 forEach((k, v) => values.add(v)); 74 forEach((k, v) => values.add(v));
75 return values; 75 return values;
76 } 76 }
77 77
78 int get length => $dom_length; 78 int get length => $dom_length;
79 79
80 bool get isEmpty => $dom_key(0) == null; 80 bool get isEmpty => $dom_key(0) == null;
81 $!MEMBERS 81 $!MEMBERS
82 } 82 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | tools/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698