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

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: Change to runtime string patch - always check index of contains method. 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
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..42a3b6ef8723e2b50a6e8e01021bcc83237a989a 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, trasitive, and consistent over time), and that `hashCode`
ngeoffray 2013/06/04 11:51:33 trasitive -> transitive
+ * must be the same for objects that are considered equal by `==`.
+ *
+ * The map allows `null` as an key.
ngeoffray 2013/06/04 11:51:33 an -> a
+ */
class HashMap<K, V> implements Map<K, V> {
external HashMap();

Powered by Google App Engine
This is Rietveld 408576698