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

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: Updated doc-comment. 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
« no previous file with comments | « lib/compiler/implementation/lib/interceptors.dart ('k') | runtime/lib/array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/core/list.dart
diff --git a/lib/core/list.dart b/lib/core/list.dart
index f040c95546b968afbc2e4c8da9b4cf8419612bdf..436d76024615d908f5853e869f6da552b691e48c 100644
--- a/lib/core/list.dart
+++ b/lib/core/list.dart
@@ -96,9 +96,24 @@ interface List<E> extends Collection<E> default ListImplementation<E> {
void clear();
/**
+ * Removes the element at position[index] from the list.
+ *
+ * This reduces the length of the list by one and moves all later elements
+ * down by one position.
+ * Returns the removed element.
+ * Throws a [IllegalArgumentException] if [index] is not an integer, and
+ * [IndexOutOfRangeException] if the [index] does not point inside the list.
+ *
+ * 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();
« no previous file with comments | « lib/compiler/implementation/lib/interceptors.dart ('k') | runtime/lib/array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698