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

Unified Diff: lib/coreimpl/maps.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
« no previous file with comments | « lib/coreimpl/linked_hash_map.dart ('k') | lib/coreimpl/splay_tree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/coreimpl/maps.dart
diff --git a/lib/coreimpl/maps.dart b/lib/coreimpl/maps.dart
index d120729d787b44a9e6d467e08620d74fd88bfa78..a8b4308e2e1fd834eb8474379d073bc76e778a75 100644
--- a/lib/coreimpl/maps.dart
+++ b/lib/coreimpl/maps.dart
@@ -4,13 +4,13 @@
/*
* Helper class which implements complex [Map] operations
- * in term of basic ones ([Map.getKeys], [Map.operator []],
+ * in term of basic ones ([Map.keys], [Map.operator []],
* [Map.operator []=] and [Map.remove].) Not all methods are
* necessary to implement each particular operation.
*/
class Maps {
static bool containsValue(Map map, value) {
- for (final v in map.getValues()) {
+ for (final v in map.values) {
if (value == v) {
return true;
}
@@ -19,7 +19,7 @@ class Maps {
}
static bool containsKey(Map map, key) {
- for (final k in map.getKeys()) {
+ for (final k in map.keys) {
if (key == k) {
return true;
}
@@ -37,26 +37,26 @@ class Maps {
}
static clear(Map map) {
- for (final k in map.getKeys()) {
+ for (final k in map.keys) {
map.remove(k);
}
}
static forEach(Map map, void f(key, value)) {
- for (final k in map.getKeys()) {
+ for (final k in map.keys) {
f(k, map[k]);
}
}
static Collection getValues(Map map) {
final result = [];
- for (final k in map.getKeys()) {
+ for (final k in map.keys) {
result.add(map[k]);
}
return result;
}
- static int length(Map map) => map.getKeys().length;
+ static int length(Map map) => map.keys.length;
static bool isEmpty(Map map) => length(map) == 0;
« no previous file with comments | « lib/coreimpl/linked_hash_map.dart ('k') | lib/coreimpl/splay_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698