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

Side by Side Diff: tools/dom/templates/immutable_list_mixin.darttemplate

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 | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // -- start List<$E> mixins. 1 // -- start List<$E> mixins.
2 // $E is the element type. 2 // $E is the element type.
3 3
4 // From Iterable<$E>: 4 // From Iterable<$E>:
5 5
6 Iterator<$E> get iterator { 6 Iterator<$E> get iterator {
7 // Note: NodeLists are not fixed size. And most probably length shouldn't 7 // Note: NodeLists are not fixed size. And most probably length shouldn't
8 // be cached in both iterator _and_ forEach method. For now caching it 8 // be cached in both iterator _and_ forEach method. For now caching it
9 // for consistency. 9 // for consistency.
10 return new FixedSizeListIterator<$E>(this); 10 return new FixedSizeListIterator<$E>(this);
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 $if DEFINE_CONTAINS 25 $if DEFINE_CONTAINS
26 bool contains($E element) => IterableMixinWorkaround.contains(this, element); 26 bool contains($E element) => IterableMixinWorkaround.contains(this, element);
27 $else 27 $else
28 // contains() defined by IDL. 28 // contains() defined by IDL.
29 $endif 29 $endif
30 30
31 void forEach(void f($E element)) => IterableMixinWorkaround.forEach(this, f); 31 void forEach(void f($E element)) => IterableMixinWorkaround.forEach(this, f);
32 32
33 String join([String separator]) => 33 String join([String separator = ""]) =>
34 IterableMixinWorkaround.joinList(this, separator); 34 IterableMixinWorkaround.joinList(this, separator);
35 35
36 Iterable map(f($E element)) => 36 Iterable map(f($E element)) =>
37 IterableMixinWorkaround.mapList(this, f); 37 IterableMixinWorkaround.mapList(this, f);
38 38
39 Iterable<$E> where(bool f($E element)) => 39 Iterable<$E> where(bool f($E element)) =>
40 IterableMixinWorkaround.where(this, f); 40 IterableMixinWorkaround.where(this, f);
41 41
42 Iterable expand(Iterable f($E element)) => 42 Iterable expand(Iterable f($E element)) =>
43 IterableMixinWorkaround.expand(this, f); 43 IterableMixinWorkaround.expand(this, f);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 IterableMixinWorkaround.asMapList(this); 200 IterableMixinWorkaround.asMapList(this);
201 201
202 String toString() { 202 String toString() {
203 StringBuffer buffer = new StringBuffer('['); 203 StringBuffer buffer = new StringBuffer('[');
204 buffer.writeAll(this, ', '); 204 buffer.writeAll(this, ', ');
205 buffer.write(']'); 205 buffer.write(']');
206 return buffer.toString(); 206 return buffer.toString();
207 } 207 }
208 208
209 // -- end List<$E> mixins. 209 // -- end List<$E> mixins.
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698