X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fuk%2Fac%2Febi%2Fpicr%2Fmodel%2FCrossReference.java;h=1d1f78ab338bc130ddf6c598a3d429552b53337a;hb=d9c7868a610eff29a8eddb160b6dc78a94a72470;hp=aef2ca975e05746700211b11ac91cc9815227362;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/uk/ac/ebi/picr/model/CrossReference.java b/src/uk/ac/ebi/picr/model/CrossReference.java index aef2ca9..1d1f78a 100644 --- a/src/uk/ac/ebi/picr/model/CrossReference.java +++ b/src/uk/ac/ebi/picr/model/CrossReference.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -244,15 +244,22 @@ public class CrossReference implements java.io.Serializable 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); @@ -285,6 +292,11 @@ public class CrossReference implements java.io.Serializable 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)