Index: pkg/analysis_server/lib/src/services/index/index.dart |
diff --git a/pkg/analysis_server/lib/src/services/index/index.dart b/pkg/analysis_server/lib/src/services/index/index.dart |
index e80a190e3281821f7d11e976e7fe733c8baacc39..cea7395cd6fea61badcdcba65c018e937cccd6f9 100644 |
--- a/pkg/analysis_server/lib/src/services/index/index.dart |
+++ b/pkg/analysis_server/lib/src/services/index/index.dart |
@@ -320,6 +320,16 @@ class Relationship { |
static Map<String, Relationship> _RELATIONSHIP_MAP = {}; |
/** |
+ * The next artificial hash code. |
+ */ |
+ static int _NEXT_HASH_CODE = 0; |
+ |
+ /** |
+ * The artifitial hash code for this object. |
+ */ |
+ final int _hashCode = _NEXT_HASH_CODE++; |
kasperl
2015/02/18 08:04:16
Have you considered masking here? If you start ove
scheglov
2015/02/18 17:20:32
Good question.
See https://codereview.chromium.org
|
+ |
+ /** |
* The unique identifier for this relationship. |
*/ |
final String identifier; |
@@ -330,6 +340,9 @@ class Relationship { |
Relationship(this.identifier); |
@override |
+ int get hashCode => _hashCode; |
+ |
+ @override |
String toString() => identifier; |
/** |