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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 313 } |
314 | 314 |
315 String toString() { | 315 String toString() { |
316 return Collections.collectionToString(this); | 316 return Collections.collectionToString(this); |
317 } | 317 } |
318 | 318 |
319 Iterator<T> get iterator { | 319 Iterator<T> get iterator { |
320 return new ListIterator<T>(this); | 320 return new ListIterator<T>(this); |
321 } | 321 } |
322 | 322 |
323 List<T> toList() { | 323 List<T> toList({ bool growable: false }) { |
324 return new List<T>.from(this); | 324 return new List<T>.from(this, growable: growable); |
325 } | 325 } |
326 | 326 |
327 Set<T> toSet() { | 327 Set<T> toSet() { |
328 return new Set<T>.from(this); | 328 return new Set<T>.from(this); |
329 } | 329 } |
330 } | 330 } |
OLD | NEW |