OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 /** | 5 /** |
6 * A [List] is an indexable collection with a length. It can be of | 6 * A [List] is an indexable collection with a length. It can be of |
7 * fixed size or extendable. | 7 * fixed size or extendable. |
8 */ | 8 */ |
9 interface List<E> extends Collection<E> factory ListFactory { | 9 interface List<E> extends Collection<E> factory ListFactory<E> { |
10 | 10 |
11 /** | 11 /** |
12 * Creates a list of the given [length]. | 12 * Creates a list of the given [length]. |
13 */ | 13 */ |
14 List([int length]); | 14 List([int length]); |
15 | 15 |
16 /** | 16 /** |
17 * Creates a list with the elements of [other]. The order in | 17 * Creates a list with the elements of [other]. The order in |
18 * the list will be the order provided by the iterator of [other]. | 18 * the list will be the order provided by the iterator of [other]. |
19 */ | 19 */ |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 * not extendable. | 150 * not extendable. |
151 * If [length] is 0, this method does not do anything. | 151 * If [length] is 0, this method does not do anything. |
152 * If [start] is the length of the array, this method inserts the | 152 * If [start] is the length of the array, this method inserts the |
153 * range at the end of the array. | 153 * range at the end of the array. |
154 * Throws an [IllegalArgumentException] if [length] is negative. | 154 * Throws an [IllegalArgumentException] if [length] is negative. |
155 * Throws an [IndexOutOfRangeException] if [start] or | 155 * Throws an [IndexOutOfRangeException] if [start] or |
156 * [:start + length:] are out of range. | 156 * [:start + length:] are out of range. |
157 */ | 157 */ |
158 void insertRange(int start, int length, [E initialValue]); | 158 void insertRange(int start, int length, [E initialValue]); |
159 } | 159 } |
OLD | NEW |