applied copyright 2008
[jalview.git] / src / vamsas / objects / simple / JpredResult.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3  * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
4  * 
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  * 
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * 
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
18  */
19 package vamsas.objects.simple;
20
21 public class JpredResult
22     extends vamsas.objects.simple.Result implements java.io.Serializable
23 {
24   private java.lang.String aligfile;
25   private java.lang.String predfile;
26
27   public JpredResult()
28   {
29   }
30
31   public JpredResult(
32       java.lang.String aligfile,
33       java.lang.String predfile)
34   {
35     this.aligfile = aligfile;
36     this.predfile = predfile;
37   }
38
39   /**
40    * Gets the aligfile value for this JpredResult.
41    *
42    * @return aligfile
43    */
44   public java.lang.String getAligfile()
45   {
46     return aligfile;
47   }
48
49   /**
50    * Sets the aligfile value for this JpredResult.
51    *
52    * @param aligfile
53    */
54   public void setAligfile(java.lang.String aligfile)
55   {
56     this.aligfile = aligfile;
57   }
58
59   /**
60    * Gets the predfile value for this JpredResult.
61    *
62    * @return predfile
63    */
64   public java.lang.String getPredfile()
65   {
66     return predfile;
67   }
68
69   /**
70    * Sets the predfile value for this JpredResult.
71    *
72    * @param predfile
73    */
74   public void setPredfile(java.lang.String predfile)
75   {
76     this.predfile = predfile;
77   }
78
79   private java.lang.Object __equalsCalc = null;
80   public synchronized boolean equals(java.lang.Object obj)
81   {
82     if (! (obj instanceof JpredResult))
83     {
84       return false;
85     }
86     JpredResult other = (JpredResult) obj;
87     if (obj == null)
88     {
89       return false;
90     }
91     if (this == obj)
92     {
93       return true;
94     }
95     if (__equalsCalc != null)
96     {
97       return (__equalsCalc == obj);
98     }
99     __equalsCalc = obj;
100     boolean _equals;
101     _equals = super.equals(obj) &&
102         ( (this.aligfile == null && other.getAligfile() == null) ||
103          (this.aligfile != null &&
104           this.aligfile.equals(other.getAligfile()))) &&
105         ( (this.predfile == null && other.getPredfile() == null) ||
106          (this.predfile != null &&
107           this.predfile.equals(other.getPredfile())));
108     __equalsCalc = null;
109     return _equals;
110   }
111
112   private boolean __hashCodeCalc = false;
113   public synchronized int hashCode()
114   {
115     if (__hashCodeCalc)
116     {
117       return 0;
118     }
119     __hashCodeCalc = true;
120     int _hashCode = super.hashCode();
121     if (getAligfile() != null)
122     {
123       _hashCode += getAligfile().hashCode();
124     }
125     if (getPredfile() != null)
126     {
127       _hashCode += getPredfile().hashCode();
128     }
129     __hashCodeCalc = false;
130     return _hashCode;
131   }
132
133 }