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

Unified Diff: lib/list_proxy.dart

Issue 10916294: switch html5lib to new pkg layout (Closed) Base URL: https://github.com/dart-lang/html5lib.git@master
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
« no previous file with comments | « lib/inputstream.dart ('k') | lib/src/char_encodings.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/list_proxy.dart
diff --git a/lib/list_proxy.dart b/lib/list_proxy.dart
deleted file mode 100644
index 2f039321ea9cb88a63264590a72271b63d27b3c4..0000000000000000000000000000000000000000
--- a/lib/list_proxy.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-// TODO(jmesserly): remove this once we have a subclassable growable list
-// in our libraries.
-
-/** A [List] proxy that you can subclass. */
-#library('list_proxy');
-
-/**
- * A [List<T>] proxy that you can subclass.
- */
-class ListProxy<T> implements List<T> {
-
- /** The inner [List<T>] with the actual storage. */
- final List<T> _list;
-
- /**
- * Creates a list proxy.
- * You can optionally specify the list to use for [storage] of the items,
- * otherwise this will create a [List<E>].
- */
- ListProxy([List<T> storage])
- : _list = storage != null ? storage : <T>[];
-
- // Implement every method from List ...
- Iterator<T> iterator() => _list.iterator();
- int get length => _list.length;
- T operator [](int index) => _list[index];
- int indexOf(T element, [int start = 0]) => _list.indexOf(element, start);
- int lastIndexOf(T element, [int start]) => _list.lastIndexOf(element, start);
- List<T> getRange(int start, int length) => _list.getRange(start, length);
- void forEach(void f(T element)) => _list.forEach(f);
- Collection map(f(T element)) => _list.map(f);
- reduce(initialValue, combine(previousValue, T element)) =>
- _list.reduce(initialValue, combine);
-
- Collection<T> filter(bool f(T element)) => _list.filter(f);
- bool every(bool f(T element)) => _list.every(f);
- bool some(bool f(T element)) => _list.some(f);
- bool isEmpty() => _list.isEmpty();
- T last() => _list.last();
-
- set length(int value) { _list.length = value; }
- operator []=(int index, T value) { _list[index] = value; }
- void add(T value) { _list.add(value); }
- void addLast(T value) { _list.addLast(value); }
- void addAll(Collection<T> collection) { _list.addAll(collection); }
- void sort(int compare(T a, T b)) { _list.sort(compare); }
- void clear() { _list.clear(); }
- T removeLast() => _list.removeLast();
- void setRange(int start, int length, List<T> from, [int startFrom]) {
- _list.setRange(start, length, from, startFrom);
- }
- void removeRange(int start, int length) { _list.removeRange(start, length); }
- void insertRange(int start, int length, [T initialValue]) {
- _list.insertRange(start, length, initialValue);
- }
-}
« no previous file with comments | « lib/inputstream.dart ('k') | lib/src/char_encodings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698