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

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

Issue 14175013: Add setAll, insertAll, replaceRange and fillRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/_collection_dev/list.dart
diff --git a/sdk/lib/_collection_dev/list.dart b/sdk/lib/_collection_dev/list.dart
index 3deb4050772b2968608f25dcb7fff25032c93a0b..93e49aeff356f8d9fbe4dd27957ec96df9d790ef 100644
--- a/sdk/lib/_collection_dev/list.dart
+++ b/sdk/lib/_collection_dev/list.dart
@@ -25,6 +25,11 @@ abstract class FixedLengthListMixin<E> {
"Cannot add to a fixed-length list");
}
+ void insertAll(int at, Iterable<E> iterable) {
+ throw new UnsupportedError(
+ "Cannot add to a fixed-length list");
+ }
+
void addAll(Iterable<E> iterable) {
throw new UnsupportedError(
"Cannot add to a fixed-length list");
@@ -74,6 +79,11 @@ abstract class FixedLengthListMixin<E> {
throw new UnsupportedError(
"Cannot remove from a fixed-length list");
}
+
+ void replaceRange(int start, int end, Iterable<E> iterable) {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
}
/**
@@ -95,6 +105,11 @@ abstract class UnmodifiableListMixin<E> {
"Cannot change the length of an unmodifiable list");
}
+ void setAll(int at, Iterable<E> iterable) {
+ throw new UnsupportedError(
+ "Cannot modify an unmodifiable list");
+ }
+
void add(E value) {
throw new UnsupportedError(
"Cannot add to an unmodifiable list");
@@ -105,6 +120,11 @@ abstract class UnmodifiableListMixin<E> {
"Cannot add to an unmodifiable list");
}
+ void insertAll(int at, Iterable<E> iterable) {
+ throw new UnsupportedError(
+ "Cannot add to an unmodifiable list");
+ }
+
void addAll(Iterable<E> iterable) {
throw new UnsupportedError(
"Cannot add to an unmodifiable list");
@@ -164,6 +184,16 @@ abstract class UnmodifiableListMixin<E> {
throw new UnsupportedError(
"Cannot remove from an unmodifiable list");
}
+
+ void replaceRange(int start, int end, Iterable<E> iterable) {
+ throw new UnsupportedError(
+ "Cannot remove from an unmodifiable list");
+ }
+
+ void fillRange(int start, int end, [E fillValue]) {
+ throw new UnsupportedError(
+ "Cannot modify an unmodifiable list");
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698