2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
\r
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package uk.ac.ebi.picr.model;
\r
21 public class UPEntry implements java.io.Serializable
\r
23 private java.lang.String CRC64;
\r
25 private java.lang.String UPI;
\r
27 private uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences;
\r
29 private uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences;
\r
31 private java.lang.String sequence;
\r
33 private java.util.Calendar timestamp;
\r
39 public UPEntry(java.lang.String CRC64, java.lang.String UPI,
\r
40 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences,
\r
41 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences,
\r
42 java.lang.String sequence, java.util.Calendar timestamp)
\r
46 this.identicalCrossReferences = identicalCrossReferences;
\r
47 this.logicalCrossReferences = logicalCrossReferences;
\r
48 this.sequence = sequence;
\r
49 this.timestamp = timestamp;
\r
53 * Gets the CRC64 value for this UPEntry.
\r
57 public java.lang.String getCRC64()
\r
63 * Sets the CRC64 value for this UPEntry.
\r
67 public void setCRC64(java.lang.String CRC64)
\r
73 * Gets the UPI value for this UPEntry.
\r
77 public java.lang.String getUPI()
\r
83 * Sets the UPI value for this UPEntry.
\r
87 public void setUPI(java.lang.String UPI)
\r
93 * Gets the identicalCrossReferences value for this UPEntry.
\r
95 * @return identicalCrossReferences
\r
97 public uk.ac.ebi.picr.model.CrossReference[] getIdenticalCrossReferences()
\r
99 return identicalCrossReferences;
\r
103 * Sets the identicalCrossReferences value for this UPEntry.
\r
105 * @param identicalCrossReferences
\r
107 public void setIdenticalCrossReferences(
\r
108 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences)
\r
110 this.identicalCrossReferences = identicalCrossReferences;
\r
113 public uk.ac.ebi.picr.model.CrossReference getIdenticalCrossReferences(
\r
116 return this.identicalCrossReferences[i];
\r
119 public void setIdenticalCrossReferences(int i,
\r
120 uk.ac.ebi.picr.model.CrossReference _value)
\r
122 this.identicalCrossReferences[i] = _value;
\r
126 * Gets the logicalCrossReferences value for this UPEntry.
\r
128 * @return logicalCrossReferences
\r
130 public uk.ac.ebi.picr.model.CrossReference[] getLogicalCrossReferences()
\r
132 return logicalCrossReferences;
\r
136 * Sets the logicalCrossReferences value for this UPEntry.
\r
138 * @param logicalCrossReferences
\r
140 public void setLogicalCrossReferences(
\r
141 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences)
\r
143 this.logicalCrossReferences = logicalCrossReferences;
\r
146 public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences(int i)
\r
148 return this.logicalCrossReferences[i];
\r
151 public void setLogicalCrossReferences(int i,
\r
152 uk.ac.ebi.picr.model.CrossReference _value)
\r
154 this.logicalCrossReferences[i] = _value;
\r
158 * Gets the sequence value for this UPEntry.
\r
162 public java.lang.String getSequence()
\r
168 * Sets the sequence value for this UPEntry.
\r
172 public void setSequence(java.lang.String sequence)
\r
174 this.sequence = sequence;
\r
178 * Gets the timestamp value for this UPEntry.
\r
180 * @return timestamp
\r
182 public java.util.Calendar getTimestamp()
\r
188 * Sets the timestamp value for this UPEntry.
\r
192 public void setTimestamp(java.util.Calendar timestamp)
\r
194 this.timestamp = timestamp;
\r
197 private java.lang.Object __equalsCalc = null;
\r
199 public synchronized boolean equals(java.lang.Object obj)
\r
201 if (!(obj instanceof UPEntry))
\r
203 UPEntry other = (UPEntry) obj;
\r
208 if (__equalsCalc != null)
\r
210 return (__equalsCalc == obj);
\r
212 __equalsCalc = obj;
\r
215 && ((this.CRC64 == null && other.getCRC64() == null) || (this.CRC64 != null && this.CRC64
\r
216 .equals(other.getCRC64())))
\r
217 && ((this.UPI == null && other.getUPI() == null) || (this.UPI != null && this.UPI
\r
218 .equals(other.getUPI())))
\r
219 && ((this.identicalCrossReferences == null && other
\r
220 .getIdenticalCrossReferences() == null) || (this.identicalCrossReferences != null && java.util.Arrays
\r
221 .equals(this.identicalCrossReferences, other
\r
222 .getIdenticalCrossReferences())))
\r
223 && ((this.logicalCrossReferences == null && other
\r
224 .getLogicalCrossReferences() == null) || (this.logicalCrossReferences != null && java.util.Arrays
\r
225 .equals(this.logicalCrossReferences, other
\r
226 .getLogicalCrossReferences())))
\r
227 && ((this.sequence == null && other.getSequence() == null) || (this.sequence != null && this.sequence
\r
228 .equals(other.getSequence())))
\r
229 && ((this.timestamp == null && other.getTimestamp() == null) || (this.timestamp != null && this.timestamp
\r
230 .equals(other.getTimestamp())));
\r
231 __equalsCalc = null;
\r
235 private boolean __hashCodeCalc = false;
\r
237 public synchronized int hashCode()
\r
239 if (__hashCodeCalc)
\r
243 __hashCodeCalc = true;
\r
245 if (getCRC64() != null)
\r
247 _hashCode += getCRC64().hashCode();
\r
249 if (getUPI() != null)
\r
251 _hashCode += getUPI().hashCode();
\r
253 if (getIdenticalCrossReferences() != null)
\r
255 for (int i = 0; i < java.lang.reflect.Array
\r
256 .getLength(getIdenticalCrossReferences()); i++)
\r
258 java.lang.Object obj = java.lang.reflect.Array.get(
\r
259 getIdenticalCrossReferences(), i);
\r
260 if (obj != null && !obj.getClass().isArray())
\r
262 _hashCode += obj.hashCode();
\r
266 if (getLogicalCrossReferences() != null)
\r
268 for (int i = 0; i < java.lang.reflect.Array
\r
269 .getLength(getLogicalCrossReferences()); i++)
\r
271 java.lang.Object obj = java.lang.reflect.Array.get(
\r
272 getLogicalCrossReferences(), i);
\r
273 if (obj != null && !obj.getClass().isArray())
\r
275 _hashCode += obj.hashCode();
\r
279 if (getSequence() != null)
\r
281 _hashCode += getSequence().hashCode();
\r
283 if (getTimestamp() != null)
\r
285 _hashCode += getTimestamp().hashCode();
\r
287 __hashCodeCalc = false;
\r