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

Side by Side Diff: tools/dom/src/CssClassSet.dart

Issue 13945009: Make default argument to Iterable.join be "". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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
« no previous file with comments | « tests/corelib/iterable_join_test.dart ('k') | tools/dom/src/WrappedList.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 html; 5 part of html;
6 6
7 abstract class CssClassSet implements Set<String> { 7 abstract class CssClassSet implements Set<String> {
8 8
9 String toString() { 9 String toString() {
10 return readClasses().join(' '); 10 return readClasses().join(' ');
(...skipping 24 matching lines...) Expand all
35 35
36 // interface Iterable - BEGIN 36 // interface Iterable - BEGIN
37 Iterator<String> get iterator => readClasses().iterator; 37 Iterator<String> get iterator => readClasses().iterator;
38 // interface Iterable - END 38 // interface Iterable - END
39 39
40 // interface Collection - BEGIN 40 // interface Collection - BEGIN
41 void forEach(void f(String element)) { 41 void forEach(void f(String element)) {
42 readClasses().forEach(f); 42 readClasses().forEach(f);
43 } 43 }
44 44
45 String join([String separator]) => readClasses().join(separator); 45 String join([String separator = ""]) => readClasses().join(separator);
46 46
47 Iterable map(f(String element)) => readClasses().map(f); 47 Iterable map(f(String element)) => readClasses().map(f);
48 48
49 Iterable<String> where(bool f(String element)) => readClasses().where(f); 49 Iterable<String> where(bool f(String element)) => readClasses().where(f);
50 50
51 Iterable expand(Iterable f(String element)) => readClasses().expand(f); 51 Iterable expand(Iterable f(String element)) => readClasses().expand(f);
52 52
53 bool every(bool f(String element)) => readClasses().every(f); 53 bool every(bool f(String element)) => readClasses().every(f);
54 54
55 bool any(bool f(String element)) => readClasses().any(f); 55 bool any(bool f(String element)) => readClasses().any(f);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 */ 215 */
216 Set<String> readClasses(); 216 Set<String> readClasses();
217 217
218 /** 218 /**
219 * Join all the elements of a set into one string and write 219 * Join all the elements of a set into one string and write
220 * back to the element. 220 * back to the element.
221 * This is intended to be overridden by specific implementations. 221 * This is intended to be overridden by specific implementations.
222 */ 222 */
223 void writeClasses(Set<String> s); 223 void writeClasses(Set<String> s);
224 } 224 }
OLDNEW
« no previous file with comments | « tests/corelib/iterable_join_test.dart ('k') | tools/dom/src/WrappedList.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698