X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fuk%2Fac%2Febi%2Fpicr%2Fmodel%2FUPEntry.java;h=9fe2f2fb7903fcd8ae204e291f79c7c139c46eb0;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=8a82575910d7f6926b756599b484cacdc421fcd6;hpb=b2f9a8d7bce642ff4011bc6d49e02bb0569fbb11;p=jalview.git diff --git a/src/uk/ac/ebi/picr/model/UPEntry.java b/src/uk/ac/ebi/picr/model/UPEntry.java index 8a82575..9fe2f2f 100644 --- a/src/uk/ac/ebi/picr/model/UPEntry.java +++ b/src/uk/ac/ebi/picr/model/UPEntry.java @@ -1,19 +1,21 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package uk.ac.ebi.picr.model; @@ -143,7 +145,8 @@ public class UPEntry implements java.io.Serializable this.logicalCrossReferences = logicalCrossReferences; } - public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences(int i) + public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences( + int i) { return this.logicalCrossReferences[i]; } @@ -196,44 +199,58 @@ public class UPEntry 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 UPEntry)) + { return false; + } UPEntry other = (UPEntry) obj; - if (obj == null) - return false; if (this == obj) + { return true; + } if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; - _equals = true - && ((this.CRC64 == null && other.getCRC64() == null) || (this.CRC64 != null && this.CRC64 - .equals(other.getCRC64()))) - && ((this.UPI == null && other.getUPI() == null) || (this.UPI != null && this.UPI - .equals(other.getUPI()))) - && ((this.identicalCrossReferences == null && other - .getIdenticalCrossReferences() == null) || (this.identicalCrossReferences != null && java.util.Arrays - .equals(this.identicalCrossReferences, - other.getIdenticalCrossReferences()))) - && ((this.logicalCrossReferences == null && other - .getLogicalCrossReferences() == null) || (this.logicalCrossReferences != null && java.util.Arrays - .equals(this.logicalCrossReferences, - other.getLogicalCrossReferences()))) - && ((this.sequence == null && other.getSequence() == null) || (this.sequence != null && this.sequence - .equals(other.getSequence()))) - && ((this.timestamp == null && other.getTimestamp() == null) || (this.timestamp != null && this.timestamp - .equals(other.getTimestamp()))); + _equals = true && ((this.CRC64 == null && other.getCRC64() == null) + || (this.CRC64 != null && this.CRC64.equals(other.getCRC64()))) + && ((this.UPI == null && other.getUPI() == null) + || (this.UPI != null + && this.UPI.equals(other.getUPI()))) + && ((this.identicalCrossReferences == null + && other.getIdenticalCrossReferences() == null) + || (this.identicalCrossReferences != null + && java.util.Arrays.equals( + this.identicalCrossReferences, + other.getIdenticalCrossReferences()))) + && ((this.logicalCrossReferences == null + && other.getLogicalCrossReferences() == null) + || (this.logicalCrossReferences != null + && java.util.Arrays.equals( + this.logicalCrossReferences, + other.getLogicalCrossReferences()))) + && ((this.sequence == null && other.getSequence() == null) + || (this.sequence != null + && this.sequence.equals(other.getSequence()))) + && ((this.timestamp == null && other.getTimestamp() == null) + || (this.timestamp != null && this.timestamp + .equals(other.getTimestamp()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; + @Override public synchronized int hashCode() { if (__hashCodeCalc) @@ -255,8 +272,8 @@ public class UPEntry implements java.io.Serializable for (int i = 0; i < java.lang.reflect.Array .getLength(getIdenticalCrossReferences()); i++) { - java.lang.Object obj = java.lang.reflect.Array.get( - getIdenticalCrossReferences(), i); + java.lang.Object obj = java.lang.reflect.Array + .get(getIdenticalCrossReferences(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); @@ -268,8 +285,8 @@ public class UPEntry implements java.io.Serializable for (int i = 0; i < java.lang.reflect.Array .getLength(getLogicalCrossReferences()); i++) { - java.lang.Object obj = java.lang.reflect.Array.get( - getLogicalCrossReferences(), i); + java.lang.Object obj = java.lang.reflect.Array + .get(getLogicalCrossReferences(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode();