directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r581595 - in /directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers: SchemaErrorWrapper.java SchemaWarningWrapper.java
Date Wed, 03 Oct 2007 13:32:10 GMT
Author: pamarcelot
Date: Wed Oct  3 06:32:10 2007
New Revision: 581595

URL: http://svn.apache.org/viewvc?rev=581595&view=rev
Log:
Added equals() and hashCode() methods to fix visual issues.

Modified:
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaErrorWrapper.java
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaWarningWrapper.java

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaErrorWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaErrorWrapper.java?rev=581595&r1=581594&r2=581595&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaErrorWrapper.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaErrorWrapper.java
Wed Oct  3 06:32:10 2007
@@ -82,4 +82,45 @@
     {
         return false;
     }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.schemaeditor.view.wrappers.AbstractTreeNode#equals(java.lang.Object)
+     */
+    public boolean equals( Object obj )
+    {
+        if ( obj instanceof SchemaWarningWrapper )
+        {
+            if ( super.equals( obj ) )
+            {
+                SchemaErrorWrapper sww = ( SchemaErrorWrapper ) obj;
+
+                if ( ( schemaError != null ) && ( !schemaError.equals( sww.getSchemaError()
) ) )
+                {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+
+        // Default
+        return false;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.schemaeditor.view.wrappers.AbstractTreeNode#hashCode()
+     */
+    public int hashCode()
+    {
+        int result = super.hashCode();
+
+        if ( schemaError != null )
+        {
+            result = 37 * result + schemaError.hashCode();
+        }
+
+        return result;
+    }
 }

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaWarningWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaWarningWrapper.java?rev=581595&r1=581594&r2=581595&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaWarningWrapper.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaWarningWrapper.java
Wed Oct  3 06:32:10 2007
@@ -82,4 +82,45 @@
     {
         return false;
     }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.schemaeditor.view.wrappers.AbstractTreeNode#equals(java.lang.Object)
+     */
+    public boolean equals( Object obj )
+    {
+        if ( obj instanceof SchemaWarningWrapper )
+        {
+            if ( super.equals( obj ) )
+            {
+                SchemaWarningWrapper sww = ( SchemaWarningWrapper ) obj;
+
+                if ( ( schemaWarning != null ) && ( !schemaWarning.equals( sww.getSchemaWarning()
) ) )
+                {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+
+        // Default
+        return false;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.schemaeditor.view.wrappers.AbstractTreeNode#hashCode()
+     */
+    public int hashCode()
+    {
+        int result = super.hashCode();
+
+        if ( schemaWarning != null )
+        {
+            result = 37 * result + schemaWarning.hashCode();
+        }
+
+        return result;
+    }
 }



Mime
View raw message