Index: runtime/lib/growable_array.dart |
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart |
index e332dd1aac8a6489cba621ecf7c86850832f32c5..ad4765b65ce1f5a8722d84a250fb6ccdd58e47b7 100644 |
--- a/runtime/lib/growable_array.dart |
+++ b/runtime/lib/growable_array.dart |
@@ -166,9 +166,9 @@ class _GrowableObjectArray<T> implements List<T> { |
_setData(new_data); |
} |
- /** |
- * Collection interface. |
- */ |
+ // Collection interface. |
+ |
+ bool contains(T element) => Collections.contains(this, element); |
void forEach(f(T element)) { |
// TODO(srdjan): Use Collections.forEach(this, f); |
@@ -216,28 +216,6 @@ class _GrowableObjectArray<T> implements List<T> { |
} |
Iterator<T> iterator() { |
- return new VariableSizeArrayIterator<T>(this); |
- } |
-} |
- |
- |
-// Iterator for arrays with variable size. |
-class VariableSizeArrayIterator<T> implements Iterator<T> { |
- VariableSizeArrayIterator(_GrowableObjectArray<T> array) |
- : _array = array, _pos = 0 { |
+ return new SequenceIterator<T>(this); |
} |
- |
- bool hasNext() { |
- return _array.length > _pos; |
- } |
- |
- T next() { |
- if (!hasNext()) { |
- throw const NoMoreElementsException(); |
- } |
- return _array[_pos++]; |
- } |
- |
- final _GrowableObjectArray<T> _array; |
- int _pos; |
} |