| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |