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. | 8 * A [List] is an indexable collection with a length. |
9 * | 9 * |
10 * A `List` implementation can choose not to support all methods | 10 * A `List` implementation can choose not to support all methods |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 /** | 280 /** |
281 * Removes the elements in the range [start]..[end] (excluding). | 281 * Removes the elements in the range [start]..[end] (excluding). |
282 * | 282 * |
283 * It is an error if [start]..[end] is not a valid range pointing into the | 283 * It is an error if [start]..[end] is not a valid range pointing into the |
284 * `this`. | 284 * `this`. |
285 */ | 285 */ |
286 void removeRange(int start, int end); | 286 void removeRange(int start, int end); |
287 | 287 |
288 /** | 288 /** |
289 * Inserts a new range into the list, starting from [start] to | |
290 * [:start + length - 1:]. The entries are filled with [fill]. | |
291 * Throws an [UnsupportedError] if the list is | |
292 * not extendable. | |
293 * If [length] is 0, this method does not do anything. | |
294 * If [start] is the length of the list, this method inserts the | |
295 * range at the end of the list. | |
296 * Throws an [ArgumentError] if [length] is negative. | |
297 * Throws an [RangeError] if [start] is negative or if | |
298 * [start] is greater than the length of the list. | |
299 */ | |
300 void insertRange(int start, int length, [E fill]); | |
301 | |
302 /** | |
303 * Returns an unmodifiable [Map] view of `this`. | 289 * Returns an unmodifiable [Map] view of `this`. |
304 * | 290 * |
305 * It has the indices of this list as keys, and the corresponding elements | 291 * It has the indices of this list as keys, and the corresponding elements |
306 * as values. | 292 * as values. |
307 */ | 293 */ |
308 Map<int, E> asMap(); | 294 Map<int, E> asMap(); |
309 } | 295 } |
OLD | NEW |