Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: sdk/lib/collection/collections.dart

Issue 12089023: Don't use ReversedListView from outside core and collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix dart2js. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.collection; 5 part of dart.collection;
6 6
7 /** 7 /**
8 * This class provides default implementations for Iterables (including Lists). 8 * This class provides default implementations for Iterables (including Lists).
9 * 9 *
10 * Once Dart receives Mixins it will be replaced with mixin classes. 10 * Once Dart receives Mixins it will be replaced with mixin classes.
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 static List skipList(List list, int n) { 330 static List skipList(List list, int n) {
331 // The generic type is currently lost. It will be fixed with mixins. 331 // The generic type is currently lost. It will be fixed with mixins.
332 return new ListView(list, n, null); 332 return new ListView(list, n, null);
333 } 333 }
334 334
335 static Iterable skipWhile(Iterable iterable, bool test(var value)) { 335 static Iterable skipWhile(Iterable iterable, bool test(var value)) {
336 // The generic type is currently lost. It will be fixed with mixins. 336 // The generic type is currently lost. It will be fixed with mixins.
337 return new SkipWhileIterable(iterable, test); 337 return new SkipWhileIterable(iterable, test);
338 } 338 }
339 339
340 static List reversedList(List l) {
341 return new ReversedListView(l, 0, null);
342 }
343
340 static void sortList(List l, int compare(a, b)) { 344 static void sortList(List l, int compare(a, b)) {
341 if (compare == null) compare = Comparable.compare; 345 if (compare == null) compare = Comparable.compare;
342 Sort.sort(l, compare); 346 Sort.sort(l, compare);
343 } 347 }
344 } 348 }
345 349
346 /** 350 /**
347 * The [Collections] class implements static methods useful when 351 * The [Collections] class implements static methods useful when
348 * writing a class that implements [Collection] and the [iterator] 352 * writing a class that implements [Collection] and the [iterator]
349 * method. 353 * method.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 static List skipList(List list, int n) 454 static List skipList(List list, int n)
451 => IterableMixinWorkaround.skipList(list, n); 455 => IterableMixinWorkaround.skipList(list, n);
452 456
453 /** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/ 457 /** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/
454 static Iterable skipWhile(Iterable iterable, bool test(var value)) 458 static Iterable skipWhile(Iterable iterable, bool test(var value))
455 => IterableMixinWorkaround.skipWhile(iterable, test); 459 => IterableMixinWorkaround.skipWhile(iterable, test);
456 460
457 static String collectionToString(Collection c) 461 static String collectionToString(Collection c)
458 => ToString.collectionToString(c); 462 => ToString.collectionToString(c);
459 } 463 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/js_array.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698