Author: chris.laprun(a)jboss.com
Date: 2011-10-17 13:16:10 -0400 (Mon, 17 Oct 2011)
New Revision: 7750
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java
Log:
- Added equals and hashCode implementations.
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java 2011-10-17
17:12:19 UTC (rev 7749)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java 2011-10-17
17:16:10 UTC (rev 7750)
@@ -75,6 +75,34 @@
this.key = key;
}
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
+
+ RegistrationImpl that = (RegistrationImpl)o;
+
+ if (!key.equals(that.key))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return key.hashCode();
+ }
+
public void setRegistrationHandle(String handle)
{
this.registrationHandle = handle;
Show replies by date