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

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

Issue 16337007: Version 0.5.13.1 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 7 years, 7 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
Index: pkg/analyzer_experimental/lib/src/generated/java_core.dart
===================================================================
--- pkg/analyzer_experimental/lib/src/generated/java_core.dart (revision 23549)
+++ pkg/analyzer_experimental/lib/src/generated/java_core.dart (working copy)
@@ -268,6 +268,15 @@
String toString() => "NumberFormatException";
}
+/// Parses given string to [Uri], throws [URISyntaxException] if invalid.
+Uri parseUriWithException(String str) {
+ Uri uri = Uri.parse(str);
+ if (uri.path.isEmpty) {
+ throw new URISyntaxException();
+ }
+ return uri;
+}
+
class URISyntaxException implements Exception {
String toString() => "URISyntaxException";
}
@@ -421,17 +430,24 @@
}
class MapEntry<K, V> {
- K _key;
+ final Map<K, V> _map;
+ final K _key;
V _value;
- MapEntry(this._key, this._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;
+ }
}
Set<MapEntry> getMapEntrySet(Map m) {
Set<MapEntry> result = new Set();
m.forEach((k, v) {
- result.add(new MapEntry(k, v));
+ result.add(new MapEntry(m, k, v));
});
return result;
}

Powered by Google App Engine
This is Rietveld 408576698