7328cbd8a6c452538dd8c975b39bde8d26b8ce61
[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 package vamsas.objects.simple;
9
10 public class Alignment  extends vamsas.objects.simple.Object  implements java.io.Serializable {
11     private java.lang.String gapchar;
12     private java.lang.String[] method;
13     private vamsas.objects.simple.SequenceSet seqs;
14     private vamsas.objects.simple.Sequence[] seqsAsArray;
15
16     public Alignment() {
17     }
18
19     public Alignment(
20            java.lang.String gapchar,
21            java.lang.String[] method,
22            vamsas.objects.simple.SequenceSet seqs,
23            vamsas.objects.simple.Sequence[] seqsAsArray) {
24            this.gapchar = gapchar;
25            this.method = method;
26            this.seqs = seqs;
27            this.seqsAsArray = seqsAsArray;
28     }
29
30
31     /**
32      * Gets the gapchar value for this Alignment.
33      * 
34      * @return gapchar
35      */
36     public java.lang.String getGapchar() {
37         return gapchar;
38     }
39
40
41     /**
42      * Sets the gapchar value for this Alignment.
43      * 
44      * @param gapchar
45      */
46     public void setGapchar(java.lang.String gapchar) {
47         this.gapchar = gapchar;
48     }
49
50
51     /**
52      * Gets the method value for this Alignment.
53      * 
54      * @return method
55      */
56     public java.lang.String[] getMethod() {
57         return method;
58     }
59
60
61     /**
62      * Sets the method value for this Alignment.
63      * 
64      * @param method
65      */
66     public void setMethod(java.lang.String[] method) {
67         this.method = method;
68     }
69
70
71     /**
72      * Gets the seqs value for this Alignment.
73      * 
74      * @return seqs
75      */
76     public vamsas.objects.simple.SequenceSet getSeqs() {
77         return seqs;
78     }
79
80
81     /**
82      * Sets the seqs value for this Alignment.
83      * 
84      * @param seqs
85      */
86     public void setSeqs(vamsas.objects.simple.SequenceSet seqs) {
87         this.seqs = seqs;
88     }
89
90
91     /**
92      * Gets the seqsAsArray value for this Alignment.
93      * 
94      * @return seqsAsArray
95      */
96     public vamsas.objects.simple.Sequence[] getSeqsAsArray() {
97         return seqsAsArray;
98     }
99
100
101     /**
102      * Sets the seqsAsArray value for this Alignment.
103      * 
104      * @param seqsAsArray
105      */
106     public void setSeqsAsArray(vamsas.objects.simple.Sequence[] seqsAsArray) {
107         this.seqsAsArray = seqsAsArray;
108     }
109
110     private java.lang.Object __equalsCalc = null;
111     public synchronized boolean equals(java.lang.Object obj) {
112         if (!(obj instanceof Alignment)) return false;
113         Alignment other = (Alignment) obj;
114         if (obj == null) return false;
115         if (this == obj) return true;
116         if (__equalsCalc != null) {
117             return (__equalsCalc == obj);
118         }
119         __equalsCalc = obj;
120         boolean _equals;
121         _equals = super.equals(obj) && 
122             ((this.gapchar==null && other.getGapchar()==null) || 
123              (this.gapchar!=null &&
124               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 &&
130               this.seqs.equals(other.getSeqs()))) &&
131             ((this.seqsAsArray==null && other.getSeqsAsArray()==null) || 
132              (this.seqsAsArray!=null &&
133               java.util.Arrays.equals(this.seqsAsArray, other.getSeqsAsArray())));
134         __equalsCalc = null;
135         return _equals;
136     }
137
138     private boolean __hashCodeCalc = false;
139     public synchronized int hashCode() {
140         if (__hashCodeCalc) {
141             return 0;
142         }
143         __hashCodeCalc = true;
144         int _hashCode = super.hashCode();
145         if (getGapchar() != null) {
146             _hashCode += getGapchar().hashCode();
147         }
148         if (getMethod() != null) {
149             for (int i=0;
150                  i<java.lang.reflect.Array.getLength(getMethod());
151                  i++) {
152                 java.lang.Object obj = java.lang.reflect.Array.get(getMethod(), i);
153                 if (obj != null &&
154                     !obj.getClass().isArray()) {
155                     _hashCode += obj.hashCode();
156                 }
157             }
158         }
159         if (getSeqs() != null) {
160             _hashCode += getSeqs().hashCode();
161         }
162         if (getSeqsAsArray() != null) {
163             for (int i=0;
164                  i<java.lang.reflect.Array.getLength(getSeqsAsArray());
165                  i++) {
166                 java.lang.Object obj = java.lang.reflect.Array.get(getSeqsAsArray(), i);
167                 if (obj != null &&
168                     !obj.getClass().isArray()) {
169                     _hashCode += obj.hashCode();
170                 }
171             }
172         }
173         __hashCodeCalc = false;
174         return _hashCode;
175     }
176
177 }