Formatted source
[jalview.git] / src / vamsas / objects / simple / Sequence.java
1 /**
2  * Sequence.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  */\r
7 \r
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 */\r
26 package vamsas.objects.simple;\r
27 \r
28 public class Sequence implements java.io.Serializable {\r
29     private java.lang.String id;\r
30     private java.lang.String seq;\r
31     private java.lang.Object __equalsCalc = null;\r
32     private boolean __hashCodeCalc = false;\r
33 \r
34     public Sequence() {\r
35     }\r
36 \r
37     public Sequence(java.lang.String id, java.lang.String seq) {\r
38         this.id = id;\r
39         this.seq = seq;\r
40     }\r
41 \r
42     /**
43  * Gets the id value for this Sequence.
44  *
45  * @return id
46  */\r
47     public java.lang.String getId() {\r
48         return id;\r
49     }\r
50 \r
51     /**
52  * Sets the id value for this Sequence.
53  *
54  * @param id
55  */\r
56     public void setId(java.lang.String id) {\r
57         this.id = id;\r
58     }\r
59 \r
60     /**
61  * Gets the seq value for this Sequence.
62  *
63  * @return seq
64  */\r
65     public java.lang.String getSeq() {\r
66         return seq;\r
67     }\r
68 \r
69     /**
70  * Sets the seq value for this Sequence.
71  *
72  * @param seq
73  */\r
74     public void setSeq(java.lang.String seq) {\r
75         this.seq = seq;\r
76     }\r
77 \r
78     public synchronized boolean equals(java.lang.Object obj) {\r
79         if (!(obj instanceof Sequence)) {\r
80             return false;\r
81         }\r
82 \r
83         Sequence other = (Sequence) obj;\r
84 \r
85         if (obj == null) {\r
86             return false;\r
87         }\r
88 \r
89         if (this == obj) {\r
90             return true;\r
91         }\r
92 \r
93         if (__equalsCalc != null) {\r
94             return (__equalsCalc == obj);\r
95         }\r
96 \r
97         __equalsCalc = obj;\r
98 \r
99         boolean _equals;\r
100         _equals = true &&\r
101             (((this.id == null) && (other.getId() == null)) ||\r
102             ((this.id != null) && this.id.equals(other.getId()))) &&\r
103             (((this.seq == null) && (other.getSeq() == null)) ||\r
104             ((this.seq != null) && this.seq.equals(other.getSeq())));\r
105         __equalsCalc = null;\r
106 \r
107         return _equals;\r
108     }\r
109 \r
110     public synchronized int hashCode() {\r
111         if (__hashCodeCalc) {\r
112             return 0;\r
113         }\r
114 \r
115         __hashCodeCalc = true;\r
116 \r
117         int _hashCode = 1;\r
118 \r
119         if (getId() != null) {\r
120             _hashCode += getId().hashCode();\r
121         }\r
122 \r
123         if (getSeq() != null) {\r
124             _hashCode += getSeq().hashCode();\r
125         }\r
126 \r
127         __hashCodeCalc = false;\r
128 \r
129         return _hashCode;\r
130     }\r
131 }\r