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

Unified Diff: sdk/lib/collection/hash_map.dart

Issue 16285004: Better documentation on Sets and Maps, and more. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 7 years, 6 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 | « sdk/lib/async/stream.dart ('k') | sdk/lib/collection/hash_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/hash_map.dart
diff --git a/sdk/lib/collection/hash_map.dart b/sdk/lib/collection/hash_map.dart
index 431c89f5dc21dcc2eecb501073fe495d326a0c1a..1f707dcfbd41f4bcaee7fdec728ce882bbb1205b 100644
--- a/sdk/lib/collection/hash_map.dart
+++ b/sdk/lib/collection/hash_map.dart
@@ -4,6 +4,17 @@
part of dart.collection;
+/**
+ * A hash-table based implementation of [Map].
+ *
+ * The keys of a `HashMap` must have consistent [Object.operator==]
+ * and [Object.hashCode] implementations. This means that the `==` operator
+ * must define a stable equivalence relation on the keys (reflexive,
+ * anti-symmetric, trasnitive, and consistent over time), and that `hashCode`
floitsch 2013/06/06 14:00:53 transitive
Lasse Reichstein Nielsen 2013/06/10 05:48:50 But I changed that! Really! Grumble!
+ * must be the same for objects that are considered equal by `==`.
+ *
+ * The map allows `null` as a key.
floitsch 2013/06/06 14:00:53 Should we add that the equivalence relationship do
Lasse Reichstein Nielsen 2013/06/10 05:48:50 That is a property of doubles, which should be not
+ */
class HashMap<K, V> implements Map<K, V> {
external HashMap();
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/collection/hash_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698