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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 * If [start] is not provided, it defaults to [:this.length - 1:]. | 185 * If [start] is not provided, it defaults to [:this.length - 1:]. |
186 * | 186 * |
187 * Returns -1 if [element] is not found. | 187 * Returns -1 if [element] is not found. |
188 */ | 188 */ |
189 int lastIndexOf(E element, [int start]); | 189 int lastIndexOf(E element, [int start]); |
190 | 190 |
191 /** | 191 /** |
192 * Removes all objects from this list; | 192 * Removes all objects from this list; |
193 * the length of the list becomes zero. | 193 * the length of the list becomes zero. |
194 * | 194 * |
195 * Throws an [UnsupportedError], and retains all objects, if this | 195 * Throws an [UnsupportedError], and retains all objects, if this |
196 * is a fixed-length list. | 196 * is a fixed-length list. |
197 */ | 197 */ |
198 void clear(); | 198 void clear(); |
199 | 199 |
200 /** | 200 /** |
201 * Inserts the object at position [index] in this list. | 201 * Inserts the object at position [index] in this list. |
202 * | 202 * |
203 * This increases the length of the list by one and shifts all objects | 203 * This increases the length of the list by one and shifts all objects |
204 * at or after the index towards the end of the list. | 204 * at or after the index towards the end of the list. |
205 * | 205 * |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 366 |
367 /** | 367 /** |
368 * Returns an unmodifiable [Map] view of `this`. | 368 * Returns an unmodifiable [Map] view of `this`. |
369 * | 369 * |
370 * The map uses the indices of this list as keys and the corresponding objects | 370 * The map uses the indices of this list as keys and the corresponding objects |
371 * as values. The `Map.keys` [Iterable] iterates the indices of this list | 371 * as values. The `Map.keys` [Iterable] iterates the indices of this list |
372 * in numerical order. | 372 * in numerical order. |
373 */ | 373 */ |
374 Map<int, E> asMap(); | 374 Map<int, E> asMap(); |
375 } | 375 } |
OLD | NEW |