2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package vamsas.objects.simple;
23 public class Result implements java.io.Serializable
25 private boolean broken;
27 private boolean failed;
29 private boolean finished;
31 private boolean invalid;
33 private boolean jobFailed;
35 private boolean queued;
37 private boolean running;
39 private boolean serverError;
43 private java.lang.String status;
45 private boolean suspended;
51 public Result(boolean broken, boolean failed, boolean finished,
52 boolean invalid, boolean jobFailed, boolean queued,
53 boolean running, boolean serverError, int state,
54 java.lang.String status, boolean suspended)
58 this.finished = finished;
59 this.invalid = invalid;
60 this.jobFailed = jobFailed;
62 this.running = running;
63 this.serverError = serverError;
66 this.suspended = suspended;
70 * Gets the broken value for this Result.
74 public boolean isBroken()
80 * Sets the broken value for this Result.
84 public void setBroken(boolean broken)
90 * Gets the failed value for this Result.
94 public boolean isFailed()
100 * Sets the failed value for this Result.
104 public void setFailed(boolean failed)
106 this.failed = failed;
110 * Gets the finished value for this Result.
114 public boolean isFinished()
120 * Sets the finished value for this Result.
124 public void setFinished(boolean finished)
126 this.finished = finished;
130 * Gets the invalid value for this Result.
134 public boolean isInvalid()
140 * Sets the invalid value for this Result.
144 public void setInvalid(boolean invalid)
146 this.invalid = invalid;
150 * Gets the jobFailed value for this Result.
154 public boolean isJobFailed()
160 * Sets the jobFailed value for this Result.
164 public void setJobFailed(boolean jobFailed)
166 this.jobFailed = jobFailed;
170 * Gets the queued value for this Result.
174 public boolean isQueued()
180 * Sets the queued value for this Result.
184 public void setQueued(boolean queued)
186 this.queued = queued;
190 * Gets the running value for this Result.
194 public boolean isRunning()
200 * Sets the running value for this Result.
204 public void setRunning(boolean running)
206 this.running = running;
210 * Gets the serverError value for this Result.
212 * @return serverError
214 public boolean isServerError()
220 * Sets the serverError value for this Result.
224 public void setServerError(boolean serverError)
226 this.serverError = serverError;
230 * Gets the state value for this Result.
234 public int getState()
240 * Sets the state value for this Result.
244 public void setState(int state)
250 * Gets the status value for this Result.
254 public java.lang.String getStatus()
260 * Sets the status value for this Result.
264 public void setStatus(java.lang.String status)
266 this.status = status;
270 * Gets the suspended value for this Result.
274 public boolean isSuspended()
280 * Sets the suspended value for this Result.
284 public void setSuspended(boolean suspended)
286 this.suspended = suspended;
289 private java.lang.Object __equalsCalc = null;
292 public synchronized boolean equals(java.lang.Object obj)
298 if (!(obj instanceof Result))
302 Result other = (Result) obj;
307 if (__equalsCalc != null)
309 return (__equalsCalc == obj);
313 _equals = true && this.broken == other.isBroken()
314 && this.failed == other.isFailed()
315 && this.finished == other.isFinished()
316 && this.invalid == other.isInvalid()
317 && this.jobFailed == other.isJobFailed()
318 && this.queued == other.isQueued()
319 && this.running == other.isRunning()
320 && this.serverError == other.isServerError()
321 && this.state == other.getState()
322 && ((this.status == null && other.getStatus() == null)
323 || (this.status != null
324 && this.status.equals(other.getStatus())))
325 && this.suspended == other.isSuspended();
330 private boolean __hashCodeCalc = false;
333 public synchronized int hashCode()
339 __hashCodeCalc = true;
341 _hashCode += (isBroken() ? Boolean.TRUE : Boolean.FALSE).hashCode();
342 _hashCode += (isFailed() ? Boolean.TRUE : Boolean.FALSE).hashCode();
343 _hashCode += (isFinished() ? Boolean.TRUE : Boolean.FALSE).hashCode();
344 _hashCode += (isInvalid() ? Boolean.TRUE : Boolean.FALSE).hashCode();
345 _hashCode += (isJobFailed() ? Boolean.TRUE : Boolean.FALSE).hashCode();
346 _hashCode += (isQueued() ? Boolean.TRUE : Boolean.FALSE).hashCode();
347 _hashCode += (isRunning() ? Boolean.TRUE : Boolean.FALSE).hashCode();
348 _hashCode += (isServerError() ? Boolean.TRUE : Boolean.FALSE)
350 _hashCode += getState();
351 if (getStatus() != null)
353 _hashCode += getStatus().hashCode();
355 _hashCode += (isSuspended() ? Boolean.TRUE : Boolean.FALSE).hashCode();
356 __hashCodeCalc = false;