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