Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: pkg/analyzer/lib/src/generated/java_core.dart

Issue 680913002: Remove JavaIterator and MapEntry (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/html.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/java_core.dart
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index 0801917da7efcb7a7f89fafcc48165077a2d4796..113b9cf386ebfaaef8a6923168f1bdabf6aeaae4 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -361,65 +361,6 @@ class MissingFormatArgumentException implements Exception {
MissingFormatArgumentException(this.s);
}
-class JavaIterator<E> {
- Iterable<E> _iterable;
- List<E> _elements = new List<E>();
- int _coPos = 0;
- int _elPos = 0;
- E _current = null;
- JavaIterator(this._iterable) {
- Iterator iterator = _iterable.iterator;
- while (iterator.moveNext()) {
- _elements.add(iterator.current);
- }
- }
-
- bool get hasNext {
- return _elPos < _elements.length;
- }
-
- E next() {
- _current = _elements[_elPos];
- _coPos++;
- _elPos++;
- return _current;
- }
-
- void remove() {
- if (_iterable is List) {
- _coPos--;
- (_iterable as List).remove(_coPos);
- } else if (_iterable is Set) {
- (_iterable as Set).remove(_current);
- } else {
- throw new StateError("Unsupported iterable ${_iterable.runtimeType}");
- }
- }
-}
-
-class MapEntry<K, V> {
- final Map<K, V> _map;
- final K _key;
- V _value;
- MapEntry(this._map, this._key, this._value);
- K getKey() => _key;
- V getValue() => _value;
- V setValue(V v) {
- V prevValue = _value;
- _value = v;
- _map[_key] = v;
- return prevValue;
- }
-}
-
-Iterable<MapEntry> getMapEntrySet(Map m) {
- List<MapEntry> result = [];
- m.forEach((k, v) {
- result.add(new MapEntry(m, k, v));
- });
- return result;
-}
-
javaListSet(List list, int index, newValue) {
var oldValue = list[index];
list[index] = newValue;
« no previous file with comments | « pkg/analyzer/lib/src/generated/html.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698