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

Side by Side Diff: sdk/lib/collection_dev/list.dart

Issue 12090093: Reapply "Rename mappedBy to map." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug in previous commit. 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 | « sdk/lib/collection/maps.dart ('k') | sdk/lib/core/iterable.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) 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.collection.dev; 5 part of dart.collection.dev;
6 6
7 /** 7 /**
8 * Class implementing the read-operations on [List]. 8 * Class implementing the read-operations on [List].
9 * 9 *
10 * Implements all read-only operations, except [:operator[]:] and [:length:], 10 * Implements all read-only operations, except [:operator[]:] and [:length:],
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 List<E> getRange(int start, int length) { 88 List<E> getRange(int start, int length) {
89 List<E> result = <E>[]; 89 List<E> result = <E>[];
90 for (int i = 0; i < length; i++) { 90 for (int i = 0; i < length; i++) {
91 result.add(this[start + i]); 91 result.add(this[start + i]);
92 } 92 }
93 return result; 93 return result;
94 } 94 }
95 95
96 Iterable map(f(E element)) {
97 return new MappedIterable(this, f);
98 }
99
96 List mappedBy(f(E element)) { 100 List mappedBy(f(E element)) {
97 return new MappedList(this, f); 101 return new MappedList(this, f);
98 } 102 }
99 103
100 List<E> take(int n) { 104 List<E> take(int n) {
101 return new ListView(this, 0, n); 105 return new ListView(this, 0, n);
102 } 106 }
103 107
104 List<E> skip(int n) { 108 List<E> skip(int n) {
105 return new ListView(this, n, null); 109 return new ListView(this, n, null);
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 throw new ConcurrentModificationError(_list); 540 throw new ConcurrentModificationError(_list);
537 } 541 }
538 if (_index <= _start) return false; 542 if (_index <= _start) return false;
539 _index -= 1; 543 _index -= 1;
540 _current = _list[_index]; 544 _current = _list[_index];
541 return true; 545 return true;
542 } 546 }
543 547
544 E get current => _current; 548 E get current => _current;
545 } 549 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/maps.dart ('k') | sdk/lib/core/iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698