directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r593827 - /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
Date Sat, 10 Nov 2007 23:57:18 GMT
Author: seelmann
Date: Sat Nov 10 15:57:16 2007
New Revision: 593827

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

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java?rev=593827&r1=593826&r2=593827&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
Sat Nov 10 15:57:16 2007
@@ -31,6 +31,7 @@
 import java.text.ParseException;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -1421,5 +1422,29 @@
     public String getString()
     {
         return string;
+    }
+
+    public int hashCode()
+    {
+        return this.toString().hashCode();
+    }
+
+    public boolean equals( Object obj )
+    {
+        if ( this == obj )
+        {
+            return true;
+        }
+        if ( obj == null )
+        {
+            return false;
+        }
+        if ( getClass() != obj.getClass() )
+        {
+            return false;
+        }
+        
+        final LdapURL other = ( LdapURL ) obj;
+        return this.toString().equals( other.toString() );
     }
 }



Mime
View raw message