| 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 class _GrowableObjectArray<T> implements List<T> { | 5 class _GrowableObjectArray<T> implements List<T> { |
| 6 factory _GrowableObjectArray._uninstantiable() { | 6 factory _GrowableObjectArray._uninstantiable() { |
| 7 throw new UnsupportedError( | 7 throw new UnsupportedError( |
| 8 "GrowableObjectArray can only be allocated by the VM"); | 8 "GrowableObjectArray can only be allocated by the VM"); |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool get isEmpty { | 305 bool get isEmpty { |
| 306 return this.length == 0; | 306 return this.length == 0; |
| 307 } | 307 } |
| 308 | 308 |
| 309 void clear() { | 309 void clear() { |
| 310 this.length = 0; | 310 this.length = 0; |
| 311 } | 311 } |
| 312 | 312 |
| 313 List<T> get reversed => new ReversedListView<T>(this, 0, null); | 313 Iterable<T> get reversed => new ReversedListIterable<T>(this); |
| 314 | 314 |
| 315 void sort([int compare(T a, T b)]) { | 315 void sort([int compare(T a, T b)]) { |
| 316 IterableMixinWorkaround.sortList(this, compare); | 316 IterableMixinWorkaround.sortList(this, compare); |
| 317 } | 317 } |
| 318 | 318 |
| 319 String toString() { | 319 String toString() { |
| 320 return Collections.collectionToString(this); | 320 return Collections.collectionToString(this); |
| 321 } | 321 } |
| 322 | 322 |
| 323 Iterator<T> get iterator { | 323 Iterator<T> get iterator { |
| 324 return new ListIterator<T>(this); | 324 return new ListIterator<T>(this); |
| 325 } | 325 } |
| 326 | 326 |
| 327 List<T> toList() { | 327 List<T> toList() { |
| 328 return new List<T>.from(this); | 328 return new List<T>.from(this); |
| 329 } | 329 } |
| 330 | 330 |
| 331 Set<T> toSet() { | 331 Set<T> toSet() { |
| 332 return new Set<T>.from(this); | 332 return new Set<T>.from(this); |
| 333 } | 333 } |
| 334 } | 334 } |
| OLD | NEW |