updated to jalview 2.1 and begun ArchiveClient/VamsasClient/VamsasStore updates.
[jalview.git] / src / vamsas / objects / simple / SequenceSet.java
1 /**
2  * SequenceSet.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
6  */
7
8 /*
9 * Jalview - A Sequence Alignment Editor and Viewer
10 * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25 */
26 package vamsas.objects.simple;
27
28 public class SequenceSet implements java.io.Serializable {
29     private vamsas.objects.simple.Sequence[] seqs;
30     private java.lang.Object __equalsCalc = null;
31     private boolean __hashCodeCalc = false;
32
33     public SequenceSet() {
34     }
35
36     public SequenceSet(vamsas.objects.simple.Sequence[] seqs) {
37         this.seqs = seqs;
38     }
39
40     /**
41  * Gets the seqs value for this SequenceSet.
42  *
43  * @return seqs
44  */
45     public vamsas.objects.simple.Sequence[] getSeqs() {
46         return seqs;
47     }
48
49     /**
50  * Sets the seqs value for this SequenceSet.
51  *
52  * @param seqs
53  */
54     public void setSeqs(vamsas.objects.simple.Sequence[] seqs) {
55         this.seqs = seqs;
56     }
57
58     public synchronized boolean equals(java.lang.Object obj) {
59         if (!(obj instanceof SequenceSet)) {
60             return false;
61         }
62
63         SequenceSet other = (SequenceSet) obj;
64
65         if (obj == null) {
66             return false;
67         }
68
69         if (this == obj) {
70             return true;
71         }
72
73         if (__equalsCalc != null) {
74             return (__equalsCalc == obj);
75         }
76
77         __equalsCalc = obj;
78
79         boolean _equals;
80         _equals = true &&
81             (((this.seqs == null) && (other.getSeqs() == null)) ||
82             ((this.seqs != null) &&
83             java.util.Arrays.equals(this.seqs, other.getSeqs())));
84         __equalsCalc = null;
85
86         return _equals;
87     }
88
89     public synchronized int hashCode() {
90         if (__hashCodeCalc) {
91             return 0;
92         }
93
94         __hashCodeCalc = true;
95
96         int _hashCode = 1;
97
98         if (getSeqs() != null) {
99             for (int i = 0; i < java.lang.reflect.Array.getLength(getSeqs());
100                     i++) {
101                 java.lang.Object obj = java.lang.reflect.Array.get(getSeqs(), i);
102
103                 if ((obj != null) && !obj.getClass().isArray()) {
104                     _hashCode += obj.hashCode();
105                 }
106             }
107         }
108
109         __hashCodeCalc = false;
110
111         return _hashCode;
112     }
113 }