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

Side by Side Diff: client/dom/common/implementation.dart

Issue 9114021: Added method map to Collection interface and all its implementations (except classes generated fr... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | client/dom/frog/dom_frog.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class ListBase<E> extends DOMType implements List<E> { 1 class ListBase<E> extends DOMType implements List<E> {
2 ListBase(); 2 ListBase();
3 3
4 void forEach(void f(E element)) => Collections.forEach(this, f); 4 void forEach(void f(E element)) => Collections.forEach(this, f);
5 Collection map(f(E element)) => Collections.map(this, [], f);
5 Collection<E> filter(bool f(E element)) => Collections.filter(this, [], f); 6 Collection<E> filter(bool f(E element)) => Collections.filter(this, [], f);
6 bool every(bool f(E element)) => Collections.every(this, f); 7 bool every(bool f(E element)) => Collections.every(this, f);
7 bool some(bool f(E element)) => Collections.some(this, f); 8 bool some(bool f(E element)) => Collections.some(this, f);
8 bool isEmpty() => Collections.isEmpty(this); 9 bool isEmpty() => Collections.isEmpty(this);
9 10
10 void sort(int compare(E a, E b)) { 11 void sort(int compare(E a, E b)) {
11 throw 'Unsupported yet'; 12 throw 'Unsupported yet';
12 } 13 }
13 14
14 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { 15 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 114 }
114 115
115 V remove(K key) { 116 V remove(K key) {
116 throw 'Immutable collection'; 117 throw 'Immutable collection';
117 } 118 }
118 119
119 Collection<K> getKeys() { 120 Collection<K> getKeys() {
120 throw 'Must be implemented'; 121 throw 'Must be implemented';
121 } 122 }
122 } 123 }
OLDNEW
« no previous file with comments | « no previous file | client/dom/frog/dom_frog.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698