| Index: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| index 12224b958318a68428ab8ffda354a4a8a37337ec..bfd100b045c6784b0cd508ff3c56c2b7db268115 100644
|
| --- a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| +++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| @@ -257,7 +257,7 @@ class IOException implements Exception {
|
| String toString() => "IOException";
|
| }
|
|
|
| -class ListWrapper<E> extends Collection<E> implements List<E> {
|
| +class ListWrapper<E> extends ListBase<E> implements List<E> {
|
| List<E> elements = new List<E>();
|
|
|
| Iterator<E> get iterator {
|
| @@ -280,10 +280,6 @@ class ListWrapper<E> extends Collection<E> implements List<E> {
|
| elements.add(value);
|
| }
|
|
|
| - void addLast(E value) {
|
| - elements.add(value);
|
| - }
|
| -
|
| void addAll(Iterable<E> iterable) {
|
| elements.addAll(iterable);
|
| }
|
| @@ -344,13 +340,13 @@ class ListWrapper<E> extends Collection<E> implements List<E> {
|
| }
|
|
|
| class JavaIterator<E> {
|
| - Collection<E> _collection;
|
| + Iterable<E> _iterable;
|
| List<E> _elements = new List<E>();
|
| int _coPos = 0;
|
| int _elPos = 0;
|
| E _current = null;
|
| - JavaIterator(this._collection) {
|
| - Iterator iterator = _collection.iterator;
|
| + JavaIterator(this._iterable) {
|
| + Iterator iterator = _iterable.iterator;
|
| while (iterator.moveNext()) {
|
| _elements.add(iterator.current);
|
| }
|
| @@ -368,13 +364,13 @@ class JavaIterator<E> {
|
| }
|
|
|
| void remove() {
|
| - if (_collection is List) {
|
| + if (_iterable is List) {
|
| _coPos--;
|
| - (_collection as List).remove(_coPos);
|
| - } else if (_collection is Set) {
|
| - _collection.remove(_current);
|
| + (_iterable as List).remove(_coPos);
|
| + } else if (_iterable is Set) {
|
| + _iterable.remove(_current);
|
| } else {
|
| - throw new StateError("Unsupported collection ${_collection.runtimeType}");
|
| + throw new StateError("Unsupported iterable ${_iterable.runtimeType}");
|
| }
|
| }
|
| }
|
|
|