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

Unified Diff: lib/core/list.dart

Issue 10970009: Add list.removeAt method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: lib/core/list.dart
diff --git a/lib/core/list.dart b/lib/core/list.dart
index f040c95546b968afbc2e4c8da9b4cf8419612bdf..83a1c0238de3c40758d22ea148f8e937f58fcfb0 100644
--- a/lib/core/list.dart
+++ b/lib/core/list.dart
@@ -95,10 +95,22 @@ interface List<E> extends Collection<E> default ListImplementation<E> {
*/
void clear();
+ /**
+ * Removes the element at position[index] from the list.
ngeoffray 2012/09/20 09:16:24 FYI: we did not have removeAt initially because it
Lasse Reichstein Nielsen 2012/09/20 10:50:29 Performance through inconvenience :) I don't think
+ *
+ * This reduces the length of the list by one and moves
+ * all later elements down by one position.
+ * Returns the removed element.
+ * Throws a [UnsupportedOperationException] if the list, or the
+ * length of the list, cannot be changed.
+ */
+ E removeAt(int index);
+
/**
* Pops and returns the last element of the list.
* Throws a [UnsupportedOperationException] if the length of the
* list cannot be changed.
+ *
*/
E removeLast();

Powered by Google App Engine
This is Rietveld 408576698