| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 | 5 |
| 6 // TODO(srdjan): Use shared array implementation. | 6 // TODO(srdjan): Use shared array implementation. |
| 7 class _ObjectArray<E> implements List<E> { | 7 class _ObjectArray<E> implements List<E> { |
| 8 | 8 |
| 9 factory _ObjectArray(length) native "ObjectArray_allocate"; | 9 factory _ObjectArray(length) native "ObjectArray_allocate"; |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 void setAll(int index, Iterable<E> iterable) { | 37 void setAll(int index, Iterable<E> iterable) { |
| 38 IterableMixinWorkaround.setAllList(this, index, iterable); | 38 IterableMixinWorkaround.setAllList(this, index, iterable); |
| 39 } | 39 } |
| 40 | 40 |
| 41 E removeAt(int index) { | 41 E removeAt(int index) { |
| 42 throw new UnsupportedError( | 42 throw new UnsupportedError( |
| 43 "Cannot remove element of a non-extendable array"); | 43 "Cannot remove element of a non-extendable array"); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void remove(Object element) { | 46 bool remove(Object element) { |
| 47 throw new UnsupportedError( | 47 throw new UnsupportedError( |
| 48 "Cannot remove element of a non-extendable array"); | 48 "Cannot remove element of a non-extendable array"); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void removeWhere(bool test(E element)) { | 51 void removeWhere(bool test(E element)) { |
| 52 throw new UnsupportedError( | 52 throw new UnsupportedError( |
| 53 "Cannot remove element of a non-extendable array"); | 53 "Cannot remove element of a non-extendable array"); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void retainWhere(bool test(E element)) { | 56 void retainWhere(bool test(E element)) { |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 void setAll(int index, Iterable<E> iterable) { | 303 void setAll(int index, Iterable<E> iterable) { |
| 304 throw new UnsupportedError( | 304 throw new UnsupportedError( |
| 305 "Cannot modify an immutable array"); | 305 "Cannot modify an immutable array"); |
| 306 } | 306 } |
| 307 | 307 |
| 308 E removeAt(int index) { | 308 E removeAt(int index) { |
| 309 throw new UnsupportedError( | 309 throw new UnsupportedError( |
| 310 "Cannot modify an immutable array"); | 310 "Cannot modify an immutable array"); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void remove(Object element) { | 313 bool remove(Object element) { |
| 314 throw new UnsupportedError( | 314 throw new UnsupportedError( |
| 315 "Cannot modify an immutable array"); | 315 "Cannot modify an immutable array"); |
| 316 } | 316 } |
| 317 | 317 |
| 318 void removeWhere(bool test(E element)) { | 318 void removeWhere(bool test(E element)) { |
| 319 throw new UnsupportedError( | 319 throw new UnsupportedError( |
| 320 "Cannot modify an immutable array"); | 320 "Cannot modify an immutable array"); |
| 321 } | 321 } |
| 322 | 322 |
| 323 void retainWhere(bool test(E element)) { | 323 void retainWhere(bool test(E element)) { |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 543 } |
| 544 _position = _length; | 544 _position = _length; |
| 545 _current = null; | 545 _current = null; |
| 546 return false; | 546 return false; |
| 547 } | 547 } |
| 548 | 548 |
| 549 E get current { | 549 E get current { |
| 550 return _current; | 550 return _current; |
| 551 } | 551 } |
| 552 } | 552 } |
| OLD | NEW |