OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library web_ui.observe.list; | 5 library web_ui.observe.list; |
6 | 6 |
7 import 'observable.dart'; | 7 import 'observable.dart'; |
8 import 'package:web_ui/src/utils_observe.dart' show Arrays, ListMixinWorkaround; | 8 import 'package:web_ui/src/utils_observe.dart' show Arrays, ListMixinWorkaround; |
9 | 9 |
10 /** | 10 /** |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void insert(int index, E item) => insertRange(index, 1, item); | 145 void insert(int index, E item) => insertRange(index, 1, item); |
146 | 146 |
147 E removeAt(int index) { | 147 E removeAt(int index) { |
148 E result = this[index]; | 148 E result = this[index]; |
149 removeRange(index, 1); | 149 removeRange(index, 1); |
150 return result; | 150 return result; |
151 } | 151 } |
152 | 152 |
153 Iterable expand(Iterable f(E)) { | 153 Iterable expand(Iterable f(E)) { |
154 throw new UnimplementedError(); | 154 throw new UnimplementedError(); |
155 return null; | |
156 } | 155 } |
157 | 156 |
158 String toString() { | 157 String toString() { |
159 if (observeReads) { | 158 if (observeReads) { |
160 for (int i = 0; i < length; i++) { | 159 for (int i = 0; i < length; i++) { |
161 notifyRead(this, ChangeRecord.INDEX, i); | 160 notifyRead(this, ChangeRecord.INDEX, i); |
162 } | 161 } |
163 } | 162 } |
164 return _list.toString(); | 163 return _list.toString(); |
165 } | 164 } |
166 } | 165 } |
OLD | NEW |