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

Side by Side Diff: runtime/lib/growable_array.dart

Issue 12086062: Rename mappedBy to map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undo change to test-script. Created 7 years, 10 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 | « runtime/lib/byte_array.dart ('k') | samples/newissues/newissues.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 class _GrowableObjectArray<T> implements List<T> { 5 class _GrowableObjectArray<T> implements List<T> {
6 factory _GrowableObjectArray._uninstantiable() { 6 factory _GrowableObjectArray._uninstantiable() {
7 throw new UnsupportedError( 7 throw new UnsupportedError(
8 "GrowableObjectArray can only be allocated by the VM"); 8 "GrowableObjectArray can only be allocated by the VM");
9 } 9 }
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } else { 235 } else {
236 buffer.add("${this[0]}"); 236 buffer.add("${this[0]}");
237 for (int i = 1; i < this.length; i++) { 237 for (int i = 1; i < this.length; i++) {
238 buffer.add(separator); 238 buffer.add(separator);
239 buffer.add("${this[i]}"); 239 buffer.add("${this[i]}");
240 } 240 }
241 } 241 }
242 return buffer.toString(); 242 return buffer.toString();
243 } 243 }
244 244
245 Iterable map(f(T element)) {
246 return IterableMixinWorkaround.map(this, f);
247 }
248
245 List mappedBy(f(T element)) { 249 List mappedBy(f(T element)) {
246 return IterableMixinWorkaround.mappedByList(this, f); 250 return IterableMixinWorkaround.mappedByList(this, f);
247 } 251 }
248 252
249 reduce(initialValue, combine(previousValue, T element)) { 253 reduce(initialValue, combine(previousValue, T element)) {
250 return IterableMixinWorkaround.reduce(this, initialValue, combine); 254 return IterableMixinWorkaround.reduce(this, initialValue, combine);
251 } 255 }
252 256
253 Iterable<T> where(bool f(T element)) { 257 Iterable<T> where(bool f(T element)) {
254 return IterableMixinWorkaround.where(this, f); 258 return IterableMixinWorkaround.where(this, f);
255 } 259 }
256 260
257 List<T> take(int n) { 261 Iterable<T> take(int n) {
258 return IterableMixinWorkaround.takeList(this, n); 262 return IterableMixinWorkaround.takeList(this, n);
259 } 263 }
260 264
261 Iterable<T> takeWhile(bool test(T value)) { 265 Iterable<T> takeWhile(bool test(T value)) {
262 return IterableMixinWorkaround.takeWhile(this, test); 266 return IterableMixinWorkaround.takeWhile(this, test);
263 } 267 }
264 268
265 List<T> skip(int n) { 269 Iterable<T> skip(int n) {
266 return IterableMixinWorkaround.skipList(this, n); 270 return IterableMixinWorkaround.skipList(this, n);
267 } 271 }
268 272
269 Iterable<T> skipWhile(bool test(T value)) { 273 Iterable<T> skipWhile(bool test(T value)) {
270 return IterableMixinWorkaround.skipWhile(this, test); 274 return IterableMixinWorkaround.skipWhile(this, test);
271 } 275 }
272 276
273 bool every(bool f(T element)) { 277 bool every(bool f(T element)) {
274 return IterableMixinWorkaround.every(this, f); 278 return IterableMixinWorkaround.every(this, f);
275 } 279 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 321 }
318 322
319 List<T> toList() { 323 List<T> toList() {
320 return new List<T>.from(this); 324 return new List<T>.from(this);
321 } 325 }
322 326
323 Set<T> toSet() { 327 Set<T> toSet() {
324 return new Set<T>.from(this); 328 return new Set<T>.from(this);
325 } 329 }
326 } 330 }
OLDNEW
« no previous file with comments | « runtime/lib/byte_array.dart ('k') | samples/newissues/newissues.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698