updated to jalview 2.1 and begun ArchiveClient/VamsasClient/VamsasStore updates.
[jalview.git] / src / vamsas / objects / simple / Alignment.java
1 /**
2  * Alignment.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 Alignment extends vamsas.objects.simple.Object
29     implements java.io.Serializable {
30     private java.lang.String gapchar;
31     private java.lang.String[] method;
32     private vamsas.objects.simple.SequenceSet seqs;
33     private java.lang.Object __equalsCalc = null;
34     private boolean __hashCodeCalc = false;
35
36     public Alignment() {
37     }
38
39     public Alignment(java.lang.String gapchar, java.lang.String[] method,
40         vamsas.objects.simple.SequenceSet seqs) {
41         this.gapchar = gapchar;
42         this.method = method;
43         this.seqs = seqs;
44     }
45
46     /**
47  * Gets the gapchar value for this Alignment.
48  *
49  * @return gapchar
50  */
51     public java.lang.String getGapchar() {
52         return gapchar;
53     }
54
55     /**
56  * Sets the gapchar value for this Alignment.
57  *
58  * @param gapchar
59  */
60     public void setGapchar(java.lang.String gapchar) {
61         this.gapchar = gapchar;
62     }
63
64     /**
65  * Gets the method value for this Alignment.
66  *
67  * @return method
68  */
69     public java.lang.String[] getMethod() {
70         return method;
71     }
72
73     /**
74  * Sets the method value for this Alignment.
75  *
76  * @param method
77  */
78     public void setMethod(java.lang.String[] method) {
79         this.method = method;
80     }
81
82     /**
83  * Gets the seqs value for this Alignment.
84  *
85  * @return seqs
86  */
87     public vamsas.objects.simple.SequenceSet getSeqs() {
88         return seqs;
89     }
90
91     /**
92  * Sets the seqs value for this Alignment.
93  *
94  * @param seqs
95  */
96     public void setSeqs(vamsas.objects.simple.SequenceSet seqs) {
97         this.seqs = seqs;
98     }
99
100     public synchronized boolean equals(java.lang.Object obj) {
101         if (!(obj instanceof Alignment)) {
102             return false;
103         }
104
105         Alignment other = (Alignment) obj;
106
107         if (obj == null) {
108             return false;
109         }
110
111         if (this == obj) {
112             return true;
113         }
114
115         if (__equalsCalc != null) {
116             return (__equalsCalc == obj);
117         }
118
119         __equalsCalc = obj;
120
121         boolean _equals;
122         _equals = super.equals(obj) &&
123             (((this.gapchar == null) && (other.getGapchar() == null)) ||
124             ((this.gapchar != null) && this.gapchar.equals(other.getGapchar()))) &&
125             (((this.method == null) && (other.getMethod() == null)) ||
126             ((this.method != null) &&
127             java.util.Arrays.equals(this.method, other.getMethod()))) &&
128             (((this.seqs == null) && (other.getSeqs() == null)) ||
129             ((this.seqs != null) && this.seqs.equals(other.getSeqs())));
130         __equalsCalc = null;
131
132         return _equals;
133     }
134
135     public synchronized int hashCode() {
136         if (__hashCodeCalc) {
137             return 0;
138         }
139
140         __hashCodeCalc = true;
141
142         int _hashCode = super.hashCode();
143
144         if (getGapchar() != null) {
145             _hashCode += getGapchar().hashCode();
146         }
147
148         if (getMethod() != null) {
149             for (int i = 0; i < java.lang.reflect.Array.getLength(getMethod());
150                     i++) {
151                 java.lang.Object obj = java.lang.reflect.Array.get(getMethod(),
152                         i);
153
154                 if ((obj != null) && !obj.getClass().isArray()) {
155                     _hashCode += obj.hashCode();
156                 }
157             }
158         }
159
160         if (getSeqs() != null) {
161             _hashCode += getSeqs().hashCode();
162         }
163
164         __hashCodeCalc = false;
165
166         return _hashCode;
167     }
168 }