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

Unified Diff: samples/swarm/swarm_ui_lib/observable/observable.dart

Issue 11896013: Add List.reversed to give a reverse fixed-length view of a list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moved some functionality to separate CL. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/js_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/observable/observable.dart
diff --git a/samples/swarm/swarm_ui_lib/observable/observable.dart b/samples/swarm/swarm_ui_lib/observable/observable.dart
index a094c484e9f83d25370a5d67aca9ba710dac7bac..e9fca10959053f5b6f832621e3fff177bd16b704 100644
--- a/samples/swarm/swarm_ui_lib/observable/observable.dart
+++ b/samples/swarm/swarm_ui_lib/observable/observable.dart
@@ -162,6 +162,8 @@ class ObservableList<T>
recordGlobalChange();
}
+ List<T> get reversed => new ReversedListView<T>(this, 0, null);
+
void sort([int compare(var a, var b)]) {
if (compare == null) compare = Comparable.compare;
_internal.sort(compare);
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/js_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698