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

Unified Diff: lib/compiler/implementation/lib/constant_map.dart

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 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
Index: lib/compiler/implementation/lib/constant_map.dart
diff --git a/lib/compiler/implementation/lib/constant_map.dart b/lib/compiler/implementation/lib/constant_map.dart
index 3e340335be29b4d5651e95d4b7d3f47d94437518..fcbd58a95300842862e5c5707fc3ba8167fda9d3 100644
--- a/lib/compiler/implementation/lib/constant_map.dart
+++ b/lib/compiler/implementation/lib/constant_map.dart
@@ -11,7 +11,7 @@ class ConstantMap<V> implements Map<String, V> {
final List<String> _keys;
bool containsValue(V needle) {
- return getValues().some((V value) => value == needle);
+ return values.some((V value) => value == needle);
}
bool containsKey(String key) {
@@ -28,9 +28,9 @@ class ConstantMap<V> implements Map<String, V> {
_keys.forEach((String key) => f(key, this[key]));
}
- Collection<String> getKeys() => _keys;
+ Collection<String> get keys => _keys;
- Collection<V> getValues() {
+ Collection<V> get values {
List<V> result = <V>[];
_keys.forEach((String key) => result.add(this[key]));
return result;
« no previous file with comments | « lib/compiler/implementation/js_backend/backend.dart ('k') | lib/compiler/implementation/lib/isolate_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698