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

Unified Diff: sdk/lib/core/list.dart

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: sdk/lib/core/list.dart
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 6740dd53e8faf335b2f36386ec0f0f8258ead7c4..d9e3fc2fa6bd7cc2d53a9e736eae51d77299dd50 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -214,13 +214,19 @@ abstract class List<E> implements Collection<E> {
E removeLast();
/**
- * Returns a new list containing [length] elements from the list,
- * starting at [start].
- * Returns an empty list if [length] is 0.
- * Throws an [ArgumentError] if [length] is negative.
- * Throws an [RangeError] if [start] or
- * [:start + length - 1:] are out of range.
+ * Returns a new list containing the elemenst from [start] to [end].
+ *
+ * If [end] is omitted, the end of the list is used.
floitsch 2013/03/14 15:46:06 length of the list ?
Lasse Reichstein Nielsen 2013/03/15 09:13:09 Done.
+ *
+ * It is an error if [start] or [end] are not list indices for this list,
+ * or if [end] is before [start].
*/
+ List<E> sublist(int start, [int end]);
+
+ /**
+ * *Deprecated*. Use [sublist] instead.
+ */
+ @deprecated
List<E> getRange(int start, int length);
/**

Powered by Google App Engine
This is Rietveld 408576698