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
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.
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.
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
19 package vamsas.objects.simple;
21 public class Result implements java.io.Serializable
23 private boolean broken;
25 private boolean failed;
27 private boolean finished;
29 private boolean invalid;
31 private boolean jobFailed;
33 private boolean queued;
35 private boolean running;
37 private boolean serverError;
41 private java.lang.String status;
43 private boolean suspended;
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)
56 this.finished = finished;
57 this.invalid = invalid;
58 this.jobFailed = jobFailed;
60 this.running = running;
61 this.serverError = serverError;
64 this.suspended = suspended;
68 * Gets the broken value for this Result.
72 public boolean isBroken()
78 * Sets the broken value for this Result.
82 public void setBroken(boolean broken)
88 * Gets the failed value for this Result.
92 public boolean isFailed()
98 * Sets the failed value for this Result.
102 public void setFailed(boolean failed)
104 this.failed = failed;
108 * Gets the finished value for this Result.
112 public boolean isFinished()
118 * Sets the finished value for this Result.
122 public void setFinished(boolean finished)
124 this.finished = finished;
128 * Gets the invalid value for this Result.
132 public boolean isInvalid()
138 * Sets the invalid value for this Result.
142 public void setInvalid(boolean invalid)
144 this.invalid = invalid;
148 * Gets the jobFailed value for this Result.
152 public boolean isJobFailed()
158 * Sets the jobFailed value for this Result.
162 public void setJobFailed(boolean jobFailed)
164 this.jobFailed = jobFailed;
168 * Gets the queued value for this Result.
172 public boolean isQueued()
178 * Sets the queued value for this Result.
182 public void setQueued(boolean queued)
184 this.queued = queued;
188 * Gets the running value for this Result.
192 public boolean isRunning()
198 * Sets the running value for this Result.
202 public void setRunning(boolean running)
204 this.running = running;
208 * Gets the serverError value for this Result.
210 * @return serverError
212 public boolean isServerError()
218 * Sets the serverError value for this Result.
222 public void setServerError(boolean serverError)
224 this.serverError = serverError;
228 * Gets the state value for this Result.
232 public int getState()
238 * Sets the state value for this Result.
242 public void setState(int state)
248 * Gets the status value for this Result.
252 public java.lang.String getStatus()
258 * Sets the status value for this Result.
262 public void setStatus(java.lang.String status)
264 this.status = status;
268 * Gets the suspended value for this Result.
272 public boolean isSuspended()
278 * Sets the suspended value for this Result.
282 public void setSuspended(boolean suspended)
284 this.suspended = suspended;
287 private java.lang.Object __equalsCalc = null;
289 public synchronized boolean equals(java.lang.Object obj)
291 if (!(obj instanceof Result))
293 Result other = (Result) obj;
298 if (__equalsCalc != null)
300 return (__equalsCalc == obj);
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();
321 private boolean __hashCodeCalc = false;
323 public synchronized int hashCode()
329 __hashCodeCalc = true;
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)
340 _hashCode += getState();
341 if (getStatus() != null)
343 _hashCode += getStatus().hashCode();
345 _hashCode += (isSuspended() ? Boolean.TRUE : Boolean.FALSE).hashCode();
346 __hashCodeCalc = false;