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

Side by Side Diff: sdk/lib/html/html_common/filtered_element_list.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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/io/http_impl.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) 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 part of html_common; 5 part of html_common;
6 6
7 /** 7 /**
8 * An indexable collection of a node's descendants in the document tree, 8 * An indexable collection of a node's descendants in the document tree,
9 * filtered so that only elements are in the collection. 9 * filtered so that only elements are in the collection.
10 */ 10 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 final len = this.length; 42 final len = this.length;
43 if (newLength >= len) { 43 if (newLength >= len) {
44 return; 44 return;
45 } else if (newLength < 0) { 45 } else if (newLength < 0) {
46 throw new ArgumentError("Invalid list length"); 46 throw new ArgumentError("Invalid list length");
47 } 47 }
48 48
49 removeRange(newLength, len - newLength); 49 removeRange(newLength, len - newLength);
50 } 50 }
51 51
52 String join([String separator]) => _filtered.join(separator); 52 String join([String separator = ""]) => _filtered.join(separator);
53 53
54 void add(Element value) { 54 void add(Element value) {
55 _childNodes.add(value); 55 _childNodes.add(value);
56 } 56 }
57 57
58 void addAll(Iterable<Element> iterable) { 58 void addAll(Iterable<Element> iterable) {
59 for (Element element in iterable) { 59 for (Element element in iterable) {
60 add(element); 60 add(element);
61 } 61 }
62 } 62 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 Element get single => _filtered.single; 211 Element get single => _filtered.single;
212 212
213 Element min([int compare(Element a, Element b)]) => _filtered.min(compare); 213 Element min([int compare(Element a, Element b)]) => _filtered.min(compare);
214 214
215 Element max([int compare(Element a, Element b)]) => _filtered.max(compare); 215 Element max([int compare(Element a, Element b)]) => _filtered.max(compare);
216 216
217 Map<int, Element> asMap() { 217 Map<int, Element> asMap() {
218 return IterableMixinWorkaround.asMapList(this); 218 return IterableMixinWorkaround.asMapList(this);
219 } 219 }
220 } 220 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698