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