GPL license added
[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) 2005 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
27 package vamsas.objects.simple;
28
29 public class SequenceSet  implements java.io.Serializable {
30     private vamsas.objects.simple.Sequence[] seqs;
31
32     public SequenceSet() {
33     }
34
35     public SequenceSet(
36            vamsas.objects.simple.Sequence[] seqs) {
37            this.seqs = seqs;
38     }
39
40
41     /**
42      * Gets the seqs value for this SequenceSet.
43      *
44      * @return seqs
45      */
46     public vamsas.objects.simple.Sequence[] getSeqs() {
47         return seqs;
48     }
49
50
51     /**
52      * Sets the seqs value for this SequenceSet.
53      *
54      * @param seqs
55      */
56     public void setSeqs(vamsas.objects.simple.Sequence[] seqs) {
57         this.seqs = seqs;
58     }
59
60     private java.lang.Object __equalsCalc = null;
61     public synchronized boolean equals(java.lang.Object obj) {
62         if (!(obj instanceof SequenceSet)) return false;
63         SequenceSet other = (SequenceSet) obj;
64         if (obj == null) return false;
65         if (this == obj) return true;
66         if (__equalsCalc != null) {
67             return (__equalsCalc == obj);
68         }
69         __equalsCalc = obj;
70         boolean _equals;
71         _equals = true &&
72             ((this.seqs==null && other.getSeqs()==null) ||
73              (this.seqs!=null &&
74               java.util.Arrays.equals(this.seqs, other.getSeqs())));
75         __equalsCalc = null;
76         return _equals;
77     }
78
79     private boolean __hashCodeCalc = false;
80     public synchronized int hashCode() {
81         if (__hashCodeCalc) {
82             return 0;
83         }
84         __hashCodeCalc = true;
85         int _hashCode = 1;
86         if (getSeqs() != null) {
87             for (int i=0;
88                  i<java.lang.reflect.Array.getLength(getSeqs());
89                  i++) {
90                 java.lang.Object obj = java.lang.reflect.Array.get(getSeqs(), i);
91                 if (obj != null &&
92                     !obj.getClass().isArray()) {
93                     _hashCode += obj.hashCode();
94                 }
95             }
96         }
97         __hashCodeCalc = false;
98         return _hashCode;
99     }
100
101 }