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