2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package uk.ac.ebi.picr.model;
21 public class UPEntry implements java.io.Serializable
23 private java.lang.String CRC64;
25 private java.lang.String UPI;
27 private uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences;
29 private uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences;
31 private java.lang.String sequence;
33 private java.util.Calendar timestamp;
39 public UPEntry(java.lang.String CRC64, java.lang.String UPI,
40 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences,
41 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences,
42 java.lang.String sequence, java.util.Calendar timestamp)
46 this.identicalCrossReferences = identicalCrossReferences;
47 this.logicalCrossReferences = logicalCrossReferences;
48 this.sequence = sequence;
49 this.timestamp = timestamp;
53 * Gets the CRC64 value for this UPEntry.
57 public java.lang.String getCRC64()
63 * Sets the CRC64 value for this UPEntry.
67 public void setCRC64(java.lang.String CRC64)
73 * Gets the UPI value for this UPEntry.
77 public java.lang.String getUPI()
83 * Sets the UPI value for this UPEntry.
87 public void setUPI(java.lang.String UPI)
93 * Gets the identicalCrossReferences value for this UPEntry.
95 * @return identicalCrossReferences
97 public uk.ac.ebi.picr.model.CrossReference[] getIdenticalCrossReferences()
99 return identicalCrossReferences;
103 * Sets the identicalCrossReferences value for this UPEntry.
105 * @param identicalCrossReferences
107 public void setIdenticalCrossReferences(
108 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences)
110 this.identicalCrossReferences = identicalCrossReferences;
113 public uk.ac.ebi.picr.model.CrossReference getIdenticalCrossReferences(
116 return this.identicalCrossReferences[i];
119 public void setIdenticalCrossReferences(int i,
120 uk.ac.ebi.picr.model.CrossReference _value)
122 this.identicalCrossReferences[i] = _value;
126 * Gets the logicalCrossReferences value for this UPEntry.
128 * @return logicalCrossReferences
130 public uk.ac.ebi.picr.model.CrossReference[] getLogicalCrossReferences()
132 return logicalCrossReferences;
136 * Sets the logicalCrossReferences value for this UPEntry.
138 * @param logicalCrossReferences
140 public void setLogicalCrossReferences(
141 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences)
143 this.logicalCrossReferences = logicalCrossReferences;
146 public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences(int i)
148 return this.logicalCrossReferences[i];
151 public void setLogicalCrossReferences(int i,
152 uk.ac.ebi.picr.model.CrossReference _value)
154 this.logicalCrossReferences[i] = _value;
158 * Gets the sequence value for this UPEntry.
162 public java.lang.String getSequence()
168 * Sets the sequence value for this UPEntry.
172 public void setSequence(java.lang.String sequence)
174 this.sequence = sequence;
178 * Gets the timestamp value for this UPEntry.
182 public java.util.Calendar getTimestamp()
188 * Sets the timestamp value for this UPEntry.
192 public void setTimestamp(java.util.Calendar timestamp)
194 this.timestamp = timestamp;
197 private java.lang.Object __equalsCalc = null;
199 public synchronized boolean equals(java.lang.Object obj)
201 if (!(obj instanceof UPEntry))
203 UPEntry other = (UPEntry) obj;
208 if (__equalsCalc != null)
210 return (__equalsCalc == obj);
215 && ((this.CRC64 == null && other.getCRC64() == null) || (this.CRC64 != null && this.CRC64
216 .equals(other.getCRC64())))
217 && ((this.UPI == null && other.getUPI() == null) || (this.UPI != null && this.UPI
218 .equals(other.getUPI())))
219 && ((this.identicalCrossReferences == null && other
220 .getIdenticalCrossReferences() == null) || (this.identicalCrossReferences != null && java.util.Arrays
221 .equals(this.identicalCrossReferences,
222 other.getIdenticalCrossReferences())))
223 && ((this.logicalCrossReferences == null && other
224 .getLogicalCrossReferences() == null) || (this.logicalCrossReferences != null && java.util.Arrays
225 .equals(this.logicalCrossReferences,
226 other.getLogicalCrossReferences())))
227 && ((this.sequence == null && other.getSequence() == null) || (this.sequence != null && this.sequence
228 .equals(other.getSequence())))
229 && ((this.timestamp == null && other.getTimestamp() == null) || (this.timestamp != null && this.timestamp
230 .equals(other.getTimestamp())));
235 private boolean __hashCodeCalc = false;
237 public synchronized int hashCode()
243 __hashCodeCalc = true;
245 if (getCRC64() != null)
247 _hashCode += getCRC64().hashCode();
249 if (getUPI() != null)
251 _hashCode += getUPI().hashCode();
253 if (getIdenticalCrossReferences() != null)
255 for (int i = 0; i < java.lang.reflect.Array
256 .getLength(getIdenticalCrossReferences()); i++)
258 java.lang.Object obj = java.lang.reflect.Array.get(
259 getIdenticalCrossReferences(), i);
260 if (obj != null && !obj.getClass().isArray())
262 _hashCode += obj.hashCode();
266 if (getLogicalCrossReferences() != null)
268 for (int i = 0; i < java.lang.reflect.Array
269 .getLength(getLogicalCrossReferences()); i++)
271 java.lang.Object obj = java.lang.reflect.Array.get(
272 getLogicalCrossReferences(), i);
273 if (obj != null && !obj.getClass().isArray())
275 _hashCode += obj.hashCode();
279 if (getSequence() != null)
281 _hashCode += getSequence().hashCode();
283 if (getTimestamp() != null)
285 _hashCode += getTimestamp().hashCode();
287 __hashCodeCalc = false;