polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [2/7] zest-qi4j git commit: And equals/hashCode is needed for the NamedAssociationValueState as well.
Date Fri, 17 Jul 2015 14:06:27 GMT
And equals/hashCode is needed for the NamedAssociationValueState as well.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/b0225a7b
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/b0225a7b
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/b0225a7b

Branch: refs/heads/develop
Commit: b0225a7b89b76c401a14c5d094779f97c84cfc7d
Parents: d2fbb10
Author: Niclas Hedhman <hedmann@betfair.com>
Authored: Fri Jul 17 08:58:43 2015 +0300
Committer: Niclas Hedhman <hedmann@betfair.com>
Committed: Fri Jul 17 08:58:43 2015 +0300

----------------------------------------------------------------------
 .../value/NamedAssociationValueState.java       | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b0225a7b/core/runtime/src/main/java/org/qi4j/runtime/value/NamedAssociationValueState.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/value/NamedAssociationValueState.java
b/core/runtime/src/main/java/org/qi4j/runtime/value/NamedAssociationValueState.java
index 14fcd84..694be18 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/value/NamedAssociationValueState.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/value/NamedAssociationValueState.java
@@ -82,4 +82,24 @@ public class NamedAssociationValueState
         return references.keySet().iterator();
     }
 
+    @Override
+    public boolean equals( Object o )
+    {
+        if( this == o )
+        {
+            return true;
+        }
+        if( o == null || getClass() != o.getClass() )
+        {
+            return false;
+        }
+        NamedAssociationValueState strings = (NamedAssociationValueState) o;
+        return references.equals( strings.references );
+    }
+
+    @Override
+    public int hashCode()
+    {
+        return references.hashCode();
+    }
 }


Mime
View raw message