| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 ObjectArray<T> backingArray; | 6 ObjectArray<T> backingArray; |
| 7 | 7 |
| 8 factory GrowableObjectArray._uninstantiable() { | 8 factory GrowableObjectArray<T>._uninstantiable() { |
| 9 throw const UnsupportedOperationException( | 9 throw const UnsupportedOperationException( |
| 10 "GrowableObjectArray can only be allocated by the VM"); | 10 "GrowableObjectArray can only be allocated by the VM"); |
| 11 } | 11 } |
| 12 | 12 |
| 13 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { | 13 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { |
| 14 Arrays.copy(src, srcStart, this, dstStart, count); | 14 Arrays.copy(src, srcStart, this, dstStart, count); |
| 15 } | 15 } |
| 16 | 16 |
| 17 void setRange(int start, int length, List<T> from, [int startFrom = 0]) { | 17 void setRange(int start, int length, List<T> from, [int startFrom = 0]) { |
| 18 if (length < 0) { | 18 if (length < 0) { |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 if (!hasNext()) { | 239 if (!hasNext()) { |
| 240 throw const NoMoreElementsException(); | 240 throw const NoMoreElementsException(); |
| 241 } | 241 } |
| 242 return _array[_pos++]; | 242 return _array[_pos++]; |
| 243 } | 243 } |
| 244 | 244 |
| 245 final GrowableObjectArray<T> _array; | 245 final GrowableObjectArray<T> _array; |
| 246 int _pos; | 246 int _pos; |
| 247 } | 247 } |
| 248 | 248 |
| OLD | NEW |