directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1079457 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
Date Tue, 08 Mar 2011 18:10:01 GMT
Author: pamarcelot
Date: Tue Mar  8 18:10:01 2011
New Revision: 1079457

URL: http://svn.apache.org/viewvc?rev=1079457&view=rev
Log:
Added hashCode() method.

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java?rev=1079457&r1=1079456&r2=1079457&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
Tue Mar  8 18:10:01 2011
@@ -87,6 +87,21 @@ public class EntryChangeImpl extends Abs
 
 
     /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = super.hashCode();
+
+        h = h * 37 + new Long( changeNumber ).intValue();
+        h = h * 37 + ( changeType == null ? 0 : changeType.hashCode() );
+        h = h * 37 + ( previousDn == null ? 0 : previousDn.hashCode() );
+
+        return h;
+    }
+
+
+    /**
      * {@inheritDoc}
      */
     @Override
@@ -104,7 +119,7 @@ public class EntryChangeImpl extends Abs
              ( previousDn.equals( otherControl.getPreviousDn() ) );
     }
 
-    
+
     /**
      * Return a String representing this EntryChangeControl.
      */



Mime
View raw message