update author list in license for (JAL-826)
[jalview.git] / src / vamsas / objects / simple / SeqSearchResult.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle\r
4  * \r
5  * This file is part of Jalview.\r
6  * \r
7  * Jalview is free software: you can redistribute it and/or\r
8  * modify it under the terms of the GNU General Public License \r
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\r
10  * \r
11  * Jalview is distributed in the hope that it will be useful, but \r
12  * WITHOUT ANY WARRANTY; without even the implied warranty \r
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR \r
14  * PURPOSE.  See the GNU General Public License for more details.\r
15  * \r
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.\r
17  */\r
18 package vamsas.objects.simple;\r
19 \r
20 public class SeqSearchResult extends vamsas.objects.simple.Result implements\r
21         java.io.Serializable\r
22 {\r
23   private vamsas.objects.simple.Alignment alignment;\r
24 \r
25   private java.lang.String annotation;\r
26 \r
27   private java.lang.String features;\r
28 \r
29   private java.lang.String newickTree;\r
30 \r
31   public SeqSearchResult()\r
32   {\r
33   }\r
34 \r
35   public SeqSearchResult(vamsas.objects.simple.Alignment alignment,\r
36           java.lang.String annotation, java.lang.String features,\r
37           java.lang.String newickTree)\r
38   {\r
39     this.alignment = alignment;\r
40     this.annotation = annotation;\r
41     this.features = features;\r
42     this.newickTree = newickTree;\r
43   }\r
44 \r
45   /**\r
46    * Gets the alignment value for this SeqSearchResult.\r
47    * \r
48    * @return alignment\r
49    */\r
50   public vamsas.objects.simple.Alignment getAlignment()\r
51   {\r
52     return alignment;\r
53   }\r
54 \r
55   /**\r
56    * Sets the alignment value for this SeqSearchResult.\r
57    * \r
58    * @param alignment\r
59    */\r
60   public void setAlignment(vamsas.objects.simple.Alignment alignment)\r
61   {\r
62     this.alignment = alignment;\r
63   }\r
64 \r
65   /**\r
66    * Gets the annotation value for this SeqSearchResult.\r
67    * \r
68    * @return annotation\r
69    */\r
70   public java.lang.String getAnnotation()\r
71   {\r
72     return annotation;\r
73   }\r
74 \r
75   /**\r
76    * Sets the annotation value for this SeqSearchResult.\r
77    * \r
78    * @param annotation\r
79    */\r
80   public void setAnnotation(java.lang.String annotation)\r
81   {\r
82     this.annotation = annotation;\r
83   }\r
84 \r
85   /**\r
86    * Gets the features value for this SeqSearchResult.\r
87    * \r
88    * @return features\r
89    */\r
90   public java.lang.String getFeatures()\r
91   {\r
92     return features;\r
93   }\r
94 \r
95   /**\r
96    * Sets the features value for this SeqSearchResult.\r
97    * \r
98    * @param features\r
99    */\r
100   public void setFeatures(java.lang.String features)\r
101   {\r
102     this.features = features;\r
103   }\r
104 \r
105   /**\r
106    * Gets the newickTree value for this SeqSearchResult.\r
107    * \r
108    * @return newickTree\r
109    */\r
110   public java.lang.String getNewickTree()\r
111   {\r
112     return newickTree;\r
113   }\r
114 \r
115   /**\r
116    * Sets the newickTree value for this SeqSearchResult.\r
117    * \r
118    * @param newickTree\r
119    */\r
120   public void setNewickTree(java.lang.String newickTree)\r
121   {\r
122     this.newickTree = newickTree;\r
123   }\r
124 \r
125   private java.lang.Object __equalsCalc = null;\r
126 \r
127   public synchronized boolean equals(java.lang.Object obj)\r
128   {\r
129     if (!(obj instanceof SeqSearchResult))\r
130       return false;\r
131     SeqSearchResult other = (SeqSearchResult) obj;\r
132     if (obj == null)\r
133       return false;\r
134     if (this == obj)\r
135       return true;\r
136     if (__equalsCalc != null)\r
137     {\r
138       return (__equalsCalc == obj);\r
139     }\r
140     __equalsCalc = obj;\r
141     boolean _equals;\r
142     _equals = super.equals(obj)\r
143             && ((this.alignment == null && other.getAlignment() == null) || (this.alignment != null && this.alignment\r
144                     .equals(other.getAlignment())))\r
145             && ((this.annotation == null && other.getAnnotation() == null) || (this.annotation != null && this.annotation\r
146                     .equals(other.getAnnotation())))\r
147             && ((this.features == null && other.getFeatures() == null) || (this.features != null && this.features\r
148                     .equals(other.getFeatures())))\r
149             && ((this.newickTree == null && other.getNewickTree() == null) || (this.newickTree != null && this.newickTree\r
150                     .equals(other.getNewickTree())));\r
151     __equalsCalc = null;\r
152     return _equals;\r
153   }\r
154 \r
155   private boolean __hashCodeCalc = false;\r
156 \r
157   public synchronized int hashCode()\r
158   {\r
159     if (__hashCodeCalc)\r
160     {\r
161       return 0;\r
162     }\r
163     __hashCodeCalc = true;\r
164     int _hashCode = super.hashCode();\r
165     if (getAlignment() != null)\r
166     {\r
167       _hashCode += getAlignment().hashCode();\r
168     }\r
169     if (getAnnotation() != null)\r
170     {\r
171       _hashCode += getAnnotation().hashCode();\r
172     }\r
173     if (getFeatures() != null)\r
174     {\r
175       _hashCode += getFeatures().hashCode();\r
176     }\r
177     if (getNewickTree() != null)\r
178     {\r
179       _hashCode += getNewickTree().hashCode();\r
180     }\r
181     __hashCodeCalc = false;\r
182     return _hashCode;\r
183   }\r
184 \r
185 }\r