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 * An indexable collection of objects with a length. | 8 * An indexable collection of objects with a length. |
9 * | 9 * |
10 * Subclasses of this class implement different kinds of lists. | 10 * Subclasses of this class implement different kinds of lists. |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 * | 322 * |
323 * The [iterable] must not have more elements than what can fit from [index] | 323 * The [iterable] must not have more elements than what can fit from [index] |
324 * to [length]. | 324 * to [length]. |
325 * | 325 * |
326 * If `iterable` is based on this list, its values may change /during/ the | 326 * If `iterable` is based on this list, its values may change /during/ the |
327 * `setAll` operation. | 327 * `setAll` operation. |
328 */ | 328 */ |
329 void setAll(int index, Iterable<E> iterable); | 329 void setAll(int index, Iterable<E> iterable); |
330 | 330 |
331 /** | 331 /** |
332 * Removes the first occurence of [value] from this list. | 332 * Removes the first occurrence of [value] from this list. |
333 * | 333 * |
334 * Returns true if [value] was in the list, false otherwise. | 334 * Returns true if [value] was in the list, false otherwise. |
335 * | 335 * |
336 * List<String> parts = ['head', 'shoulders', 'knees', 'toes']; | 336 * List<String> parts = ['head', 'shoulders', 'knees', 'toes']; |
337 * parts.remove('head'); // true | 337 * parts.remove('head'); // true |
338 * parts.join(', '); // 'shoulders, knees, toes' | 338 * parts.join(', '); // 'shoulders, knees, toes' |
339 * | 339 * |
340 * The method has no effect if [value] was not in the list. | 340 * The method has no effect if [value] was not in the list. |
341 * | 341 * |
342 * // Note: 'head' has already been removed. | 342 * // Note: 'head' has already been removed. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 * as values. The `Map.keys` [Iterable] iterates the indices of this list | 511 * as values. The `Map.keys` [Iterable] iterates the indices of this list |
512 * in numerical order. | 512 * in numerical order. |
513 * | 513 * |
514 * List<String> words = ['fee', 'fi', 'fo', 'fum']; | 514 * List<String> words = ['fee', 'fi', 'fo', 'fum']; |
515 * Map<int, String> map = words.asMap(); | 515 * Map<int, String> map = words.asMap(); |
516 * map[0] + map[1]; // 'feefi'; | 516 * map[0] + map[1]; // 'feefi'; |
517 * map.keys.toList(); // [0, 1, 2, 3] | 517 * map.keys.toList(); // [0, 1, 2, 3] |
518 */ | 518 */ |
519 Map<int, E> asMap(); | 519 Map<int, E> asMap(); |
520 } | 520 } |
OLD | NEW |