equivalence for transferring/updating references
[jalview.git] / src / jalview / datamodel / PDBEntry.java
index 7cd6a80..69f0d68 100755 (executable)
@@ -27,6 +27,23 @@ public class PDBEntry
   String id;
   Hashtable properties;
 
+  /* (non-Javadoc)
+   * @see java.lang.Object#equals(java.lang.Object)
+   */
+  public boolean equals(Object obj)
+  {
+    if (obj==null || !(obj instanceof PDBEntry))
+    {
+        return false;
+    }
+    if (obj==this)
+      return true;
+    PDBEntry o = (PDBEntry) obj;
+    return (file==o.file || (file!=null && o.file!=null && o.file.equals(file)))
+    && (type==o.type || (type!=null && o.type!=null && o.type.equals(type)))
+    && (id==o.id || (id!=null && o.id!=null && o.id.equalsIgnoreCase(id)))
+    && (properties==o.properties || (properties!=null && o.properties!=null && properties.equals(o.properties)));
+  }
   public PDBEntry()
   {}
   public PDBEntry(PDBEntry entry) {