public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof ServiceHandle))
+ if (obj == null)
{
return false;
}
- ServiceHandle other = (ServiceHandle) obj;
- if (obj == null)
+ if (!(obj instanceof ServiceHandle))
{
return false;
}
+ ServiceHandle other = (ServiceHandle) obj;
if (this == obj)
{
return true;
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof ServiceHandles))
+ if (obj == null)
{
return false;
}
- ServiceHandles other = (ServiceHandles) obj;
- if (obj == null)
+ if (!(obj instanceof ServiceHandles))
{
return false;
}
+ ServiceHandles other = (ServiceHandles) obj;
if (this == obj)
{
return true;
*/
package jalview.analysis;
-import java.util.*;
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.SequenceI;
-import jalview.datamodel.*;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Vector;
/**
* Routines for approximate Sequence Id resolution by name using string
}
}
+ @Override
public int hashCode()
{
return ((id.length() >= 4) ? id.substring(0, 4).hashCode() : id
.hashCode());
}
+ @Override
public boolean equals(Object s)
{
+ if (s == null)
+ {
+ return false;
+ }
if (s instanceof SeqIdName)
{
return this.equals((SeqIdName) s);
(entry.map == null ? null : new Mapping(entry.map)));
}
- public boolean equals(DBRefEntry entry)
+ @Override
+ public boolean equals(Object o)
{
+ // TODO should also override hashCode to ensure equal objects have equal
+ // hashcodes
+ if (o == null || !(o instanceof DBRefEntry))
+ {
+ return false;
+ }
+ DBRefEntry entry = (DBRefEntry) o;
if (entry == this)
+ {
return true;
- if (entry == null)
- return false;
+ }
if (equalRef(entry)
&& ((map == null && entry.map == null) || (map != null
&& entry.map != null && map.equals(entry.map))))
return false;
}
if (entry == this)
+ {
return true;
+ }
if ((source != null && entry.source != null && source
.equalsIgnoreCase(entry.source))
&& (accessionId != null && entry.accessionId != null && accessionId
@Override
public boolean equals(Object o)
{
+ // TODO should override Object.hashCode() to ensure that equal objects have
+ // equal hashcodes
if (o == null || !(o instanceof Mapping))
{
return false;
{
return false;
}
- if (map.equals(other.map))
+ if ((map == null && other.map == null) || map.equals(other.map))
{
return true;
}
@Override
public boolean equals(Object o)
{
+ // TODO should also override hashCode to ensure equal objects have equal
+ // hashcodes
if (o == null || !(o instanceof MapList))
{
return false;
this.gapCharacter = gapCharacter;
}
+ @Override
public boolean equals(Object o)
{
if (o == null || !(o instanceof RestServiceDescription))
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof CrossReference))
+ {
return false;
+ }
CrossReference other = (CrossReference) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ /**
+ * hashCode designed to ensure that if two instances satisfy o1.equals(o2)
+ * then they have the same hashcode.
+ */
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof UPEntry))
+ {
return false;
+ }
UPEntry other = (UPEntry) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof Data))
+ if (obj == null)
{
return false;
}
- Data other = (Data) obj;
- if (obj == null)
+ if (!(obj instanceof Data))
{
return false;
}
+ Data other = (Data) obj;
if (this == obj)
{
return true;
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof InputParams))
+ if (obj == null)
{
return false;
}
- InputParams other = (InputParams) obj;
- if (obj == null)
+ if (!(obj instanceof InputParams))
{
return false;
}
+ InputParams other = (InputParams) obj;
if (this == obj)
{
return true;
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof WSFile))
+ if (obj == null)
{
return false;
}
- WSFile other = (WSFile) obj;
- if (obj == null)
+ if (!(obj instanceof WSFile))
{
return false;
}
+ WSFile other = (WSFile) obj;
if (this == obj)
{
return true;
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof Alignment))
+ {
return false;
+ }
Alignment other = (Alignment) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof JpredResult))
+ if (obj == null)
{
return false;
}
- JpredResult other = (JpredResult) obj;
- if (obj == null)
+ if (!(obj instanceof JpredResult))
{
return false;
}
+ JpredResult other = (JpredResult) obj;
if (this == obj)
{
return true;
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
this.msa = msa;
}
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof MsaResult))
+ if (obj == null)
{
return false;
}
-
- MsaResult other = (MsaResult) obj;
-
- if (obj == null)
+ if (!(obj instanceof MsaResult))
{
return false;
}
+ MsaResult other = (MsaResult) obj;
+
if (this == obj)
{
return true;
return _equals;
}
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof Msfalignment))
+ if (obj == null)
{
return false;
}
- Msfalignment other = (Msfalignment) obj;
- if (obj == null)
+ if (!(obj instanceof Msfalignment))
{
return false;
}
+ Msfalignment other = (Msfalignment) obj;
if (this == obj)
{
return true;
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof Object))
- return false;
- Object other = (Object) obj;
if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof Object))
+ {
return false;
+ }
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof Result))
+ {
return false;
+ }
Result other = (Result) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
public synchronized boolean equals(java.lang.Object obj)
{
- if (!(obj instanceof Secstructpred))
+ if (obj == null)
{
return false;
}
- Secstructpred other = (Secstructpred) obj;
- if (obj == null)
+ if (!(obj instanceof Secstructpred))
{
return false;
}
+ Secstructpred other = (Secstructpred) obj;
if (this == obj)
{
return true;
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof SeqSearchResult))
+ {
return false;
+ }
SeqSearchResult other = (SeqSearchResult) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof Sequence))
+ {
return false;
+ }
Sequence other = (Sequence) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof SequenceSet))
+ {
return false;
+ }
SequenceSet other = (SequenceSet) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)
private java.lang.Object __equalsCalc = null;
+ @Override
public synchronized boolean equals(java.lang.Object obj)
{
+ if (obj == null)
+ {
+ return false;
+ }
if (!(obj instanceof WsJobId))
+ {
return false;
+ }
WsJobId other = (WsJobId) obj;
- if (obj == null)
- return false;
if (this == obj)
+ {
return true;
+ }
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
private boolean __hashCodeCalc = false;
+ @Override
public synchronized int hashCode()
{
if (__hashCodeCalc)