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

Unified Diff: runtime/lib/byte_array.dart

Issue 11931034: Add methods to Collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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/array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/byte_array.dart
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index 8cfe0dd06acaf85ebf2bd71674ae0cc009b2816b..8349eec5ba1bbcb0fa0d502f94974513fbd8f0be 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -307,6 +307,31 @@ abstract class _ByteArrayBase {
"Cannot remove from a non-extendable array");
}
+ void remove(Object element) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
int get first {
if (length > 0) return this[0];
throw new StateError("No elements");
@@ -1986,6 +2011,36 @@ class _ByteArrayViewBase extends Collection<int> {
"Cannot remove from a non-extendable array");
}
+ int removeAt(int index) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void remove(Object element) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError(
+ "Cannot remove from a non-extendable array");
+ }
+
int get first {
if (length > 0) return this[0];
throw new StateError("No elements");
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698