2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package uk.ac.ebi.picr.model;
23 public class UPEntry implements java.io.Serializable
25 private java.lang.String CRC64;
27 private java.lang.String UPI;
29 private uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences;
31 private uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences;
33 private java.lang.String sequence;
35 private java.util.Calendar timestamp;
41 public UPEntry(java.lang.String CRC64, java.lang.String UPI,
42 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences,
43 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences,
44 java.lang.String sequence, java.util.Calendar timestamp)
48 this.identicalCrossReferences = identicalCrossReferences;
49 this.logicalCrossReferences = logicalCrossReferences;
50 this.sequence = sequence;
51 this.timestamp = timestamp;
55 * Gets the CRC64 value for this UPEntry.
59 public java.lang.String getCRC64()
65 * Sets the CRC64 value for this UPEntry.
69 public void setCRC64(java.lang.String CRC64)
75 * Gets the UPI value for this UPEntry.
79 public java.lang.String getUPI()
85 * Sets the UPI value for this UPEntry.
89 public void setUPI(java.lang.String UPI)
95 * Gets the identicalCrossReferences value for this UPEntry.
97 * @return identicalCrossReferences
99 public uk.ac.ebi.picr.model.CrossReference[] getIdenticalCrossReferences()
101 return identicalCrossReferences;
105 * Sets the identicalCrossReferences value for this UPEntry.
107 * @param identicalCrossReferences
109 public void setIdenticalCrossReferences(
110 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences)
112 this.identicalCrossReferences = identicalCrossReferences;
115 public uk.ac.ebi.picr.model.CrossReference getIdenticalCrossReferences(
118 return this.identicalCrossReferences[i];
121 public void setIdenticalCrossReferences(int i,
122 uk.ac.ebi.picr.model.CrossReference _value)
124 this.identicalCrossReferences[i] = _value;
128 * Gets the logicalCrossReferences value for this UPEntry.
130 * @return logicalCrossReferences
132 public uk.ac.ebi.picr.model.CrossReference[] getLogicalCrossReferences()
134 return logicalCrossReferences;
138 * Sets the logicalCrossReferences value for this UPEntry.
140 * @param logicalCrossReferences
142 public void setLogicalCrossReferences(
143 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences)
145 this.logicalCrossReferences = logicalCrossReferences;
148 public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences(int i)
150 return this.logicalCrossReferences[i];
153 public void setLogicalCrossReferences(int i,
154 uk.ac.ebi.picr.model.CrossReference _value)
156 this.logicalCrossReferences[i] = _value;
160 * Gets the sequence value for this UPEntry.
164 public java.lang.String getSequence()
170 * Sets the sequence value for this UPEntry.
174 public void setSequence(java.lang.String sequence)
176 this.sequence = sequence;
180 * Gets the timestamp value for this UPEntry.
184 public java.util.Calendar getTimestamp()
190 * Sets the timestamp value for this UPEntry.
194 public void setTimestamp(java.util.Calendar timestamp)
196 this.timestamp = timestamp;
199 private java.lang.Object __equalsCalc = null;
201 public synchronized boolean equals(java.lang.Object obj)
203 if (!(obj instanceof UPEntry))
205 UPEntry other = (UPEntry) obj;
210 if (__equalsCalc != null)
212 return (__equalsCalc == obj);
217 && ((this.CRC64 == null && other.getCRC64() == null) || (this.CRC64 != null && this.CRC64
218 .equals(other.getCRC64())))
219 && ((this.UPI == null && other.getUPI() == null) || (this.UPI != null && this.UPI
220 .equals(other.getUPI())))
221 && ((this.identicalCrossReferences == null && other
222 .getIdenticalCrossReferences() == null) || (this.identicalCrossReferences != null && java.util.Arrays
223 .equals(this.identicalCrossReferences,
224 other.getIdenticalCrossReferences())))
225 && ((this.logicalCrossReferences == null && other
226 .getLogicalCrossReferences() == null) || (this.logicalCrossReferences != null && java.util.Arrays
227 .equals(this.logicalCrossReferences,
228 other.getLogicalCrossReferences())))
229 && ((this.sequence == null && other.getSequence() == null) || (this.sequence != null && this.sequence
230 .equals(other.getSequence())))
231 && ((this.timestamp == null && other.getTimestamp() == null) || (this.timestamp != null && this.timestamp
232 .equals(other.getTimestamp())));
237 private boolean __hashCodeCalc = false;
239 public synchronized int hashCode()
245 __hashCodeCalc = true;
247 if (getCRC64() != null)
249 _hashCode += getCRC64().hashCode();
251 if (getUPI() != null)
253 _hashCode += getUPI().hashCode();
255 if (getIdenticalCrossReferences() != null)
257 for (int i = 0; i < java.lang.reflect.Array
258 .getLength(getIdenticalCrossReferences()); i++)
260 java.lang.Object obj = java.lang.reflect.Array.get(
261 getIdenticalCrossReferences(), i);
262 if (obj != null && !obj.getClass().isArray())
264 _hashCode += obj.hashCode();
268 if (getLogicalCrossReferences() != null)
270 for (int i = 0; i < java.lang.reflect.Array
271 .getLength(getLogicalCrossReferences()); i++)
273 java.lang.Object obj = java.lang.reflect.Array.get(
274 getLogicalCrossReferences(), i);
275 if (obj != null && !obj.getClass().isArray())
277 _hashCode += obj.hashCode();
281 if (getSequence() != null)
283 _hashCode += getSequence().hashCode();
285 if (getTimestamp() != null)
287 _hashCode += getTimestamp().hashCode();
289 __hashCodeCalc = false;