| Index: sdk/lib/collection/collections.dart
|
| diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
|
| index 949b69dfa0128442d93ee878aba2df1158da614b..6300b11dab077b2cdcdd73bf82f648b4b9854be7 100644
|
| --- a/sdk/lib/collection/collections.dart
|
| +++ b/sdk/lib/collection/collections.dart
|
| @@ -347,13 +347,35 @@ class IterableMixinWorkaround {
|
| return new SkipWhileIterable(iterable, test);
|
| }
|
|
|
| - static Iterable reversedList(List l) {
|
| - return new ReversedListIterable(l);
|
| + static Iterable reversedList(List list) {
|
| + return new ReversedListIterable(list);
|
| }
|
|
|
| - static void sortList(List l, int compare(a, b)) {
|
| + static void sortList(List list, int compare(a, b)) {
|
| if (compare == null) compare = Comparable.compare;
|
| - Sort.sort(l, compare);
|
| + Sort.sort(list, compare);
|
| + }
|
| +
|
| + static int indexOfList(List list, var element, int start) {
|
| + return Arrays.indexOf(list, element, start, list.length);
|
| + }
|
| +
|
| + static int lastIndexOfList(List list, var element, int start) {
|
| + if (start == null) start = list.length - 1;
|
| + return Arrays.lastIndexOf(list, element, start);
|
| + }
|
| +
|
| + static void setRangeList(List list, int start, int length,
|
| + List from, int startFrom) {
|
| + if (length == 0) return;
|
| +
|
| + if (length < 0) throw new ArgumentError(length);
|
| + if (start < 0) throw new RangeError.value(start);
|
| + if (start + length > list.length) {
|
| + throw new RangeError.value(start + length);
|
| + }
|
| +
|
| + Arrays.copy(from, startFrom, list, start, length);
|
| }
|
|
|
| static Map<int, dynamic> asMapList(List l) {
|
|
|