bd9adfa152155a280f2c9693cfea703c77235305
[jalview.git] / src / vamsas / objects / simple / Alignment.java
1 /**\r
2  * Alignment.java\r
3  *\r
4  * This file was auto-generated from WSDL\r
5  * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.\r
6  */\r
7 \r
8 /*\r
9  * Jalview - A Sequence Alignment Editor and Viewer\r
10  * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
11  *\r
12  * This program is free software; you can redistribute it and/or\r
13  * modify it under the terms of the GNU General Public License\r
14  * as published by the Free Software Foundation; either version 2\r
15  * of the License, or (at your option) any later version.\r
16  *\r
17  * This program is distributed in the hope that it will be useful,\r
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
20  * GNU General Public License for more details.\r
21  *\r
22  * You should have received a copy of the GNU General Public License\r
23  * along with this program; if not, write to the Free Software\r
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
25  */\r
26 package vamsas.objects.simple;\r
27 \r
28 public class Alignment\r
29     extends vamsas.objects.simple.Object implements java.io.Serializable\r
30 {\r
31   private java.lang.String gapchar;\r
32   private java.lang.String[] method;\r
33   private vamsas.objects.simple.SequenceSet seqs;\r
34   private java.lang.Object __equalsCalc = null;\r
35   private boolean __hashCodeCalc = false;\r
36 \r
37   public Alignment()\r
38   {\r
39   }\r
40 \r
41   public Alignment(java.lang.String gapchar, java.lang.String[] method,\r
42                    vamsas.objects.simple.SequenceSet seqs)\r
43   {\r
44     this.gapchar = gapchar;\r
45     this.method = method;\r
46     this.seqs = seqs;\r
47   }\r
48 \r
49   /**\r
50    * Gets the gapchar value for this Alignment.\r
51    *\r
52    * @return gapchar\r
53    */\r
54   public java.lang.String getGapchar()\r
55   {\r
56     return gapchar;\r
57   }\r
58 \r
59   /**\r
60    * Sets the gapchar value for this Alignment.\r
61    *\r
62    * @param gapchar\r
63    */\r
64   public void setGapchar(java.lang.String gapchar)\r
65   {\r
66     this.gapchar = gapchar;\r
67   }\r
68 \r
69   /**\r
70    * Gets the method value for this Alignment.\r
71    *\r
72    * @return method\r
73    */\r
74   public java.lang.String[] getMethod()\r
75   {\r
76     return method;\r
77   }\r
78 \r
79   /**\r
80    * Sets the method value for this Alignment.\r
81    *\r
82    * @param method\r
83    */\r
84   public void setMethod(java.lang.String[] method)\r
85   {\r
86     this.method = method;\r
87   }\r
88 \r
89   /**\r
90    * Gets the seqs value for this Alignment.\r
91    *\r
92    * @return seqs\r
93    */\r
94   public vamsas.objects.simple.SequenceSet getSeqs()\r
95   {\r
96     return seqs;\r
97   }\r
98 \r
99   /**\r
100    * Sets the seqs value for this Alignment.\r
101    *\r
102    * @param seqs\r
103    */\r
104   public void setSeqs(vamsas.objects.simple.SequenceSet seqs)\r
105   {\r
106     this.seqs = seqs;\r
107   }\r
108 \r
109   public synchronized boolean equals(java.lang.Object obj)\r
110   {\r
111     if (! (obj instanceof Alignment))\r
112     {\r
113       return false;\r
114     }\r
115 \r
116     Alignment other = (Alignment) obj;\r
117 \r
118     if (obj == null)\r
119     {\r
120       return false;\r
121     }\r
122 \r
123     if (this == obj)\r
124     {\r
125       return true;\r
126     }\r
127 \r
128     if (__equalsCalc != null)\r
129     {\r
130       return (__equalsCalc == obj);\r
131     }\r
132 \r
133     __equalsCalc = obj;\r
134 \r
135     boolean _equals;\r
136     _equals = super.equals(obj) &&\r
137         ( ( (this.gapchar == null) && (other.getGapchar() == null)) ||\r
138          ( (this.gapchar != null) && this.gapchar.equals(other.getGapchar()))) &&\r
139         ( ( (this.method == null) && (other.getMethod() == null)) ||\r
140          ( (this.method != null) &&\r
141           java.util.Arrays.equals(this.method, other.getMethod()))) &&\r
142         ( ( (this.seqs == null) && (other.getSeqs() == null)) ||\r
143          ( (this.seqs != null) && this.seqs.equals(other.getSeqs())));\r
144     __equalsCalc = null;\r
145 \r
146     return _equals;\r
147   }\r
148 \r
149   public synchronized int hashCode()\r
150   {\r
151     if (__hashCodeCalc)\r
152     {\r
153       return 0;\r
154     }\r
155 \r
156     __hashCodeCalc = true;\r
157 \r
158     int _hashCode = super.hashCode();\r
159 \r
160     if (getGapchar() != null)\r
161     {\r
162       _hashCode += getGapchar().hashCode();\r
163     }\r
164 \r
165     if (getMethod() != null)\r
166     {\r
167       for (int i = 0; i < java.lang.reflect.Array.getLength(getMethod());\r
168            i++)\r
169       {\r
170         java.lang.Object obj = java.lang.reflect.Array.get(getMethod(),\r
171             i);\r
172 \r
173         if ( (obj != null) && !obj.getClass().isArray())\r
174         {\r
175           _hashCode += obj.hashCode();\r
176         }\r
177       }\r
178     }\r
179 \r
180     if (getSeqs() != null)\r
181     {\r
182       _hashCode += getSeqs().hashCode();\r
183     }\r
184 \r
185     __hashCodeCalc = false;\r
186 \r
187     return _hashCode;\r
188   }\r
189 }\r