Chromium Code Reviews| Index: runtime/lib/array.dart |
| =================================================================== |
| --- runtime/lib/array.dart (revision 486) |
| +++ runtime/lib/array.dart (working copy) |
| @@ -2,34 +2,7 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| -class ArrayFactory<T> { |
| - factory Array.from(Iterable<T> other) { |
| - GrowableObjectArray<T> array = new GrowableObjectArray<T>(); |
| - for (final e in other) { |
| - array.add(e); |
| - } |
| - return array; |
| - } |
| - |
| - factory Array.fromArray(Array<T> other, int startIndex, int endIndex) { |
| - Array array = new Array<T>(); |
| - if (endIndex > other.length) endIndex = other.length; |
| - if (startIndex < 0) startIndex = 0; |
| - int count = endIndex - startIndex; |
| - if (count > 0) { |
| - array.length = count; |
| - Arrays.copy(other, startIndex, array, 0, count); |
| - } |
| - return array; |
| - } |
| - |
| - factory Array([int length = null]) { |
| - if (length === null) { |
| - return new GrowableObjectArray<T>(); |
| - } else { |
| - return new ObjectArray<T>(length); |
| - } |
| - } |
| +interface Array<T> extends List<T> { |
|
srdjan
2011/10/18 08:08:21
If this is a temporary definition, please add a co
ngeoffray
2011/10/18 08:15:01
Yes, that's a temporary definition. Added a commen
|
| } |
| class ListFactory<T> { |