Chromium Code Reviews| Index: corelib/src/list.dart |
| diff --git a/corelib/src/list.dart b/corelib/src/list.dart |
| index 36fad3d69d3550f763e9cfdc2c54ab2e9a8fb485..a9017ae86a313539e363ec05aabb8a1e2c8aefd9 100644 |
| --- a/corelib/src/list.dart |
| +++ b/corelib/src/list.dart |
| @@ -53,7 +53,7 @@ interface List<E> extends Collection<E> default ListFactory<E> { |
| void addLast(E value); |
| /** |
| - * Appends all elements of the [collection] to the end of list. |
| + * Appends all elements of the [collection] to the end of the list. |
| * Extends the length of the list by the length of [collection]. |
| * Throws an [UnsupportedOperationException] if the list is not |
| * extendable. |
| @@ -75,14 +75,14 @@ interface List<E> extends Collection<E> default ListFactory<E> { |
| void sort(int compare(E a, E b)); |
| /** |
| - * Returns the first index of [element] in this list. Searches this |
| + * Returns the first index of [element] in the list. Searches the |
| * list from index [start] to the length of the list. Returns |
| * -1 if [element] is not found. |
| */ |
| int indexOf(E element, [int start]); |
| /** |
| - * Returns the last index of [element] in this list. Searches this |
| + * Returns the last index of [element] in the list. Searches the |
| * list from index [start] (inclusive) to 0. Returns -1 if |
| * [element] is not found. |
| */ |
| @@ -109,49 +109,49 @@ interface List<E> extends Collection<E> default ListFactory<E> { |
| E last(); |
| /** |
| - * Returns a sub list copy of this list, from [start] to |
| - * [:start + length:]. |
| + * Returns a sub list copy of the list, from [start] to |
|
Bob Nystrom
2012/05/16 16:22:37
"sub" isn't a word (or, at least, not in this cont
Bill Hesse
2012/05/21 10:26:01
Done.
|
| + * [:start + length - 1:] inclusive. |
| * Returns an empty list if [length] is 0. |
| * Throws an [IllegalArgumentException] if [length] is negative. |
| * Throws an [IndexOutOfRangeException] if [start] or |
| - * [:start + length:] are out of range. |
| + * [:start + length - 1:] are out of range. |
| */ |
| List<E> getRange(int start, int length); |
| /** |
| - * Copies [length] elements of the [from] array, starting |
| + * Copies [length] elements of the [from] list, starting |
| * from [startFrom], into [:this:], starting at [start]. |
|
Bob Nystrom
2012/05/16 16:22:37
[:this:] -> this list
Bill Hesse
2012/05/21 10:26:01
Done.
|
| * If [length] is 0, this method does not do anything. |
| * Throws an [IllegalArgumentException] if [length] is negative. |
| * Throws an [IndexOutOfRangeException] if [start] or |
| - * [:start + length:] are out of range for [:this:], or if |
| - * [startFrom] is out of range for [from]. |
| + * [:start + length - 1:] are out of range for [:this:], or if |
| + * [startFrom] or [:startFrom + length - 1:] are out of range for [from]. |
| */ |
| void setRange(int start, int length, List<E> from, [int startFrom]); |
| /** |
| - * Removes the range in the list starting from [start] to |
| - * [:start + length:]. |
| + * Removes from the list the range from [start] to |
|
Bob Nystrom
2012/05/16 16:22:37
"Removes [length] elements from this list, beginni
Bill Hesse
2012/05/21 10:26:01
Done.
|
| + * [:start + length - 1:], inclusive. |
| * Throws an [UnsupportedOperationException] if the list is |
| * not extendable. |
| * If [length] is 0, this method does not do anything. |
| * Throws an [IllegalArgumentException] if [length] is negative. |
| * Throws an [IndexOutOfRangeException] if [start] or |
| - * [:start + length:] are out of range. |
| + * [:start + length: - 1] are out of range. |
| */ |
| void removeRange(int start, int length); |
| /** |
| - * Inserts a new range in the list, starting from [start] to |
| - * [:start + length:]. The entries are filled with [initialValue]. |
| + * Inserts a new range into the list, starting from [start] to |
| + * [:start + length - 1:]. The entries are filled with [initialValue]. |
| * Throws an [UnsupportedOperationException] if the list is |
| * not extendable. |
| * If [length] is 0, this method does not do anything. |
| - * If [start] is the length of the array, this method inserts the |
| - * range at the end of the array. |
| + * If [start] is the length of the list, this method inserts the |
| + * range at the end of the list. |
| * Throws an [IllegalArgumentException] if [length] is negative. |
| - * Throws an [IndexOutOfRangeException] if [start] or |
| - * [:start + length:] are out of range. |
| + * Throws an [IndexOutOfRangeException] if [start] is negative or if |
| + * [start] is greater than the length of the list. |
| */ |
| void insertRange(int start, int length, [E initialValue]); |
| } |