update author list in license for (JAL-826)
[jalview.git] / src / vamsas / objects / simple / Result.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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  */
18 package vamsas.objects.simple;
19
20 public class Result implements java.io.Serializable
21 {
22   private boolean broken;
23
24   private boolean failed;
25
26   private boolean finished;
27
28   private boolean invalid;
29
30   private boolean jobFailed;
31
32   private boolean queued;
33
34   private boolean running;
35
36   private boolean serverError;
37
38   private int state;
39
40   private java.lang.String status;
41
42   private boolean suspended;
43
44   public Result()
45   {
46   }
47
48   public Result(boolean broken, boolean failed, boolean finished,
49           boolean invalid, boolean jobFailed, boolean queued,
50           boolean running, boolean serverError, int state,
51           java.lang.String status, boolean suspended)
52   {
53     this.broken = broken;
54     this.failed = failed;
55     this.finished = finished;
56     this.invalid = invalid;
57     this.jobFailed = jobFailed;
58     this.queued = queued;
59     this.running = running;
60     this.serverError = serverError;
61     this.state = state;
62     this.status = status;
63     this.suspended = suspended;
64   }
65
66   /**
67    * Gets the broken value for this Result.
68    * 
69    * @return broken
70    */
71   public boolean isBroken()
72   {
73     return broken;
74   }
75
76   /**
77    * Sets the broken value for this Result.
78    * 
79    * @param broken
80    */
81   public void setBroken(boolean broken)
82   {
83     this.broken = broken;
84   }
85
86   /**
87    * Gets the failed value for this Result.
88    * 
89    * @return failed
90    */
91   public boolean isFailed()
92   {
93     return failed;
94   }
95
96   /**
97    * Sets the failed value for this Result.
98    * 
99    * @param failed
100    */
101   public void setFailed(boolean failed)
102   {
103     this.failed = failed;
104   }
105
106   /**
107    * Gets the finished value for this Result.
108    * 
109    * @return finished
110    */
111   public boolean isFinished()
112   {
113     return finished;
114   }
115
116   /**
117    * Sets the finished value for this Result.
118    * 
119    * @param finished
120    */
121   public void setFinished(boolean finished)
122   {
123     this.finished = finished;
124   }
125
126   /**
127    * Gets the invalid value for this Result.
128    * 
129    * @return invalid
130    */
131   public boolean isInvalid()
132   {
133     return invalid;
134   }
135
136   /**
137    * Sets the invalid value for this Result.
138    * 
139    * @param invalid
140    */
141   public void setInvalid(boolean invalid)
142   {
143     this.invalid = invalid;
144   }
145
146   /**
147    * Gets the jobFailed value for this Result.
148    * 
149    * @return jobFailed
150    */
151   public boolean isJobFailed()
152   {
153     return jobFailed;
154   }
155
156   /**
157    * Sets the jobFailed value for this Result.
158    * 
159    * @param jobFailed
160    */
161   public void setJobFailed(boolean jobFailed)
162   {
163     this.jobFailed = jobFailed;
164   }
165
166   /**
167    * Gets the queued value for this Result.
168    * 
169    * @return queued
170    */
171   public boolean isQueued()
172   {
173     return queued;
174   }
175
176   /**
177    * Sets the queued value for this Result.
178    * 
179    * @param queued
180    */
181   public void setQueued(boolean queued)
182   {
183     this.queued = queued;
184   }
185
186   /**
187    * Gets the running value for this Result.
188    * 
189    * @return running
190    */
191   public boolean isRunning()
192   {
193     return running;
194   }
195
196   /**
197    * Sets the running value for this Result.
198    * 
199    * @param running
200    */
201   public void setRunning(boolean running)
202   {
203     this.running = running;
204   }
205
206   /**
207    * Gets the serverError value for this Result.
208    * 
209    * @return serverError
210    */
211   public boolean isServerError()
212   {
213     return serverError;
214   }
215
216   /**
217    * Sets the serverError value for this Result.
218    * 
219    * @param serverError
220    */
221   public void setServerError(boolean serverError)
222   {
223     this.serverError = serverError;
224   }
225
226   /**
227    * Gets the state value for this Result.
228    * 
229    * @return state
230    */
231   public int getState()
232   {
233     return state;
234   }
235
236   /**
237    * Sets the state value for this Result.
238    * 
239    * @param state
240    */
241   public void setState(int state)
242   {
243     this.state = state;
244   }
245
246   /**
247    * Gets the status value for this Result.
248    * 
249    * @return status
250    */
251   public java.lang.String getStatus()
252   {
253     return status;
254   }
255
256   /**
257    * Sets the status value for this Result.
258    * 
259    * @param status
260    */
261   public void setStatus(java.lang.String status)
262   {
263     this.status = status;
264   }
265
266   /**
267    * Gets the suspended value for this Result.
268    * 
269    * @return suspended
270    */
271   public boolean isSuspended()
272   {
273     return suspended;
274   }
275
276   /**
277    * Sets the suspended value for this Result.
278    * 
279    * @param suspended
280    */
281   public void setSuspended(boolean suspended)
282   {
283     this.suspended = suspended;
284   }
285
286   private java.lang.Object __equalsCalc = null;
287
288   public synchronized boolean equals(java.lang.Object obj)
289   {
290     if (!(obj instanceof Result))
291       return false;
292     Result other = (Result) obj;
293     if (obj == null)
294       return false;
295     if (this == obj)
296       return true;
297     if (__equalsCalc != null)
298     {
299       return (__equalsCalc == obj);
300     }
301     __equalsCalc = obj;
302     boolean _equals;
303     _equals = true
304             && this.broken == other.isBroken()
305             && this.failed == other.isFailed()
306             && this.finished == other.isFinished()
307             && this.invalid == other.isInvalid()
308             && this.jobFailed == other.isJobFailed()
309             && this.queued == other.isQueued()
310             && this.running == other.isRunning()
311             && this.serverError == other.isServerError()
312             && this.state == other.getState()
313             && ((this.status == null && other.getStatus() == null) || (this.status != null && this.status
314                     .equals(other.getStatus())))
315             && this.suspended == other.isSuspended();
316     __equalsCalc = null;
317     return _equals;
318   }
319
320   private boolean __hashCodeCalc = false;
321
322   public synchronized int hashCode()
323   {
324     if (__hashCodeCalc)
325     {
326       return 0;
327     }
328     __hashCodeCalc = true;
329     int _hashCode = 1;
330     _hashCode += (isBroken() ? Boolean.TRUE : Boolean.FALSE).hashCode();
331     _hashCode += (isFailed() ? Boolean.TRUE : Boolean.FALSE).hashCode();
332     _hashCode += (isFinished() ? Boolean.TRUE : Boolean.FALSE).hashCode();
333     _hashCode += (isInvalid() ? Boolean.TRUE : Boolean.FALSE).hashCode();
334     _hashCode += (isJobFailed() ? Boolean.TRUE : Boolean.FALSE).hashCode();
335     _hashCode += (isQueued() ? Boolean.TRUE : Boolean.FALSE).hashCode();
336     _hashCode += (isRunning() ? Boolean.TRUE : Boolean.FALSE).hashCode();
337     _hashCode += (isServerError() ? Boolean.TRUE : Boolean.FALSE)
338             .hashCode();
339     _hashCode += getState();
340     if (getStatus() != null)
341     {
342       _hashCode += getStatus().hashCode();
343     }
344     _hashCode += (isSuspended() ? Boolean.TRUE : Boolean.FALSE).hashCode();
345     __hashCodeCalc = false;
346     return _hashCode;
347   }
348
349 }