X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FPDBEntry.java;h=446d7193cc810df3ea627dd40435ff0b81be9fa7;hb=2253f31565d4e96edffce2fac596e2ef0578d596;hp=5c98874ecd510534fbc08585d4444a498ae88adc;hpb=d1f6cf53b29322601c621da9a6b3cb09dd28235e;p=jalview.git diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index 5c98874..446d719 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -23,38 +23,53 @@ import java.util.*; public class PDBEntry { String file; + String type; + String id; + Hashtable properties; - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { - if (obj==null || !(obj instanceof PDBEntry)) + if (obj == null || !(obj instanceof PDBEntry)) { - return false; + return false; } - if (obj==this) + 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))); + 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) { + { + } + + public PDBEntry(PDBEntry entry) + { file = entry.file; type = entry.type; id = entry.id; - if (entry.properties!=null) + if (entry.properties != null) { properties = (Hashtable) entry.properties.clone(); } } + public void setFile(String file) { this.file = file;