Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A [List] is an indexable collection with a length. It can be of | 8 * A [List] is an indexable collection with a length. It can be of |
| 9 * fixed size or extendable. | 9 * fixed size or extendable. |
| 10 */ | 10 */ |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 * Throws an [UnsupportedError] if the list is | 191 * Throws an [UnsupportedError] if the list is |
| 192 * not extendable. | 192 * not extendable. |
| 193 * If [length] is 0, this method does not do anything. | 193 * If [length] is 0, this method does not do anything. |
| 194 * If [start] is the length of the list, this method inserts the | 194 * If [start] is the length of the list, this method inserts the |
| 195 * range at the end of the list. | 195 * range at the end of the list. |
| 196 * Throws an [ArgumentError] if [length] is negative. | 196 * Throws an [ArgumentError] if [length] is negative. |
| 197 * Throws an [RangeError] if [start] is negative or if | 197 * Throws an [RangeError] if [start] is negative or if |
| 198 * [start] is greater than the length of the list. | 198 * [start] is greater than the length of the list. |
| 199 */ | 199 */ |
| 200 void insertRange(int start, int length, [E fill]); | 200 void insertRange(int start, int length, [E fill]); |
| 201 | |
| 202 /** | |
| 203 * Returns a lazy [List] where each element [:e:] of [this] is replaced | |
| 204 * by the result of [:f(e):]. | |
|
Lasse Reichstein Nielsen
2013/01/24 06:49:32
Mention "unmodifiable" somewhere.
floitsch
2013/01/24 13:48:34
Done.
| |
| 205 * | |
| 206 * This method returns a view of the mapped elements. As long as the | |
| 207 * returned [List] is not indexed or iterated over, the supplied function [f] | |
| 208 * will not be invoked. The transformed elements will not be cached. Accessing | |
| 209 * elements multiple times will invoke the supplied function [f] multiple | |
| 210 * times. | |
| 211 */ | |
| 212 List mappedBy(f(E element)); | |
| 213 | |
| 214 /** | |
| 215 * Returns a [List] that hides the first [n] elements. The returned | |
|
Lasse Reichstein Nielsen
2013/01/24 06:49:32
Newlines after '.'.
floitsch
2013/01/24 13:48:34
Done.
| |
| 216 * list is a view backed by [this]. | |
|
Lasse Reichstein Nielsen
2013/01/24 06:49:32
[this] -> [:this:]. It's not a declared name.
floitsch
2013/01/24 13:48:34
Done.
| |
| 217 * | |
| 218 * If [this] has fewer than [n] elements, then the resulting [Iterable] will | |
|
Lasse Reichstein Nielsen
2013/01/24 06:49:32
If -> While. It can change if the underlying list
floitsch
2013/01/24 13:48:34
Done.
| |
| 219 * be empty. | |
| 220 */ | |
| 221 List<E> skip(int n); | |
| 222 | |
| 223 /** | |
| 224 * Returns a [List] with at most [n] elements. The returned list is a view | |
| 225 * backed by this. | |
|
Lasse Reichstein Nielsen
2013/01/24 06:49:32
this -> [:this:] (or "this [List]").
floitsch
2013/01/24 13:48:34
Done.
| |
| 226 * | |
| 227 * The returned [List] may contain fewer than [n] elements, if [this] | |
| 228 * contains fewer than [n] elements. | |
| 229 */ | |
| 230 List<E> take(int n); | |
| 201 } | 231 } |
| OLD | NEW |