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

Side by Side Diff: sdk/lib/html/src/CssClassSet.dart

Issue 11414069: Make mappedBy lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error. 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
5 abstract class CssClassSet implements Set<String> { 5 abstract class CssClassSet implements Set<String> {
6 6
7 String toString() { 7 String toString() {
8 return Strings.join(new List.from(readClasses()), ' '); 8 return Strings.join(new List.from(readClasses()), ' ');
9 } 9 }
10 10
(...skipping 22 matching lines...) Expand all
33 33
34 // interface Iterable - BEGIN 34 // interface Iterable - BEGIN
35 Iterator<String> iterator() => readClasses().iterator(); 35 Iterator<String> iterator() => readClasses().iterator();
36 // interface Iterable - END 36 // interface Iterable - END
37 37
38 // interface Collection - BEGIN 38 // interface Collection - BEGIN
39 void forEach(void f(String element)) { 39 void forEach(void f(String element)) {
40 readClasses().forEach(f); 40 readClasses().forEach(f);
41 } 41 }
42 42
43 Collection mappedBy(f(String element)) => readClasses().mappedBy(f); 43 Iterable mappedBy(f(String element)) => readClasses().mappedBy(f);
44 44
45 Collection<String> where(bool f(String element)) => readClasses().where(f); 45 Collection<String> where(bool f(String element)) => readClasses().where(f);
46 46
47 bool every(bool f(String element)) => readClasses().every(f); 47 bool every(bool f(String element)) => readClasses().every(f);
48 48
49 bool some(bool f(String element)) => readClasses().some(f); 49 bool some(bool f(String element)) => readClasses().some(f);
50 50
51 bool get isEmpty => readClasses().isEmpty; 51 bool get isEmpty => readClasses().isEmpty;
52 52
53 int get length =>readClasses().length; 53 int get length =>readClasses().length;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 */ 114 */
115 Set<String> readClasses(); 115 Set<String> readClasses();
116 116
117 /** 117 /**
118 * Join all the elements of a set into one string and write 118 * Join all the elements of a set into one string and write
119 * back to the element. 119 * back to the element.
120 * This is intended to be overridden by specific implementations. 120 * This is intended to be overridden by specific implementations.
121 */ 121 */
122 void writeClasses(Set<String> s); 122 void writeClasses(Set<String> s);
123 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698