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

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

Issue 12401002: Make List.from and Iterable.toList default to not growable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/src/CssClassSet.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart.dom.html; 5 part of dart.dom.html;
6 6
7 /** 7 /**
8 * A list which just wraps another list, for either intercepting list calls or 8 * A list which just wraps another list, for either intercepting list calls or
9 * retyping the list (for example, from List<A> to List<B> where B extends A). 9 * retyping the list (for example, from List<A> to List<B> where B extends A).
10 */ 10 */
(...skipping 18 matching lines...) Expand all
29 29
30 dynamic reduce(initialValue, combine(previousValue, E element)) => 30 dynamic reduce(initialValue, combine(previousValue, E element)) =>
31 _list.reduce(initialValue, combine); 31 _list.reduce(initialValue, combine);
32 32
33 bool every(bool f(E element)) => _list.every(f); 33 bool every(bool f(E element)) => _list.every(f);
34 34
35 String join([String separator]) => _list.join(separator); 35 String join([String separator]) => _list.join(separator);
36 36
37 bool any(bool f(E element)) => _list.any(f); 37 bool any(bool f(E element)) => _list.any(f);
38 38
39 List<E> toList({ bool growable: false }) => 39 List<E> toList({ bool growable: true }) =>
40 new List.from(_list, growable: growable); 40 new List.from(_list, growable: growable);
41 41
42 Set<E> toSet() => _list.toSet(); 42 Set<E> toSet() => _list.toSet();
43 43
44 int get length => _list.length; 44 int get length => _list.length;
45 45
46 E min([int compare(E a, E b)]) => _list.min(compare); 46 E min([int compare(E a, E b)]) => _list.min(compare);
47 47
48 E max([int compare(E a, E b)]) => _list.max(compare); 48 E max([int compare(E a, E b)]) => _list.max(compare);
49 49
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Iterator _iterator; 133 Iterator _iterator;
134 134
135 _WrappedIterator(this._iterator); 135 _WrappedIterator(this._iterator);
136 136
137 bool moveNext() { 137 bool moveNext() {
138 return _iterator.moveNext(); 138 return _iterator.moveNext();
139 } 139 }
140 140
141 E get current => _iterator.current; 141 E get current => _iterator.current;
142 } 142 }
OLDNEW
« no previous file with comments | « tools/dom/src/CssClassSet.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698