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
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 of the License, or (at your option) any later version.
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.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package vamsas.objects.simple;
20 public class Result implements java.io.Serializable
22 private boolean broken;
24 private boolean failed;
26 private boolean finished;
28 private boolean invalid;
30 private boolean jobFailed;
32 private boolean queued;
34 private boolean running;
36 private boolean serverError;
40 private java.lang.String status;
42 private boolean suspended;
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)
55 this.finished = finished;
56 this.invalid = invalid;
57 this.jobFailed = jobFailed;
59 this.running = running;
60 this.serverError = serverError;
63 this.suspended = suspended;
67 * Gets the broken value for this Result.
71 public boolean isBroken()
77 * Sets the broken value for this Result.
81 public void setBroken(boolean broken)
87 * Gets the failed value for this Result.
91 public boolean isFailed()
97 * Sets the failed value for this Result.
101 public void setFailed(boolean failed)
103 this.failed = failed;
107 * Gets the finished value for this Result.
111 public boolean isFinished()
117 * Sets the finished value for this Result.
121 public void setFinished(boolean finished)
123 this.finished = finished;
127 * Gets the invalid value for this Result.
131 public boolean isInvalid()
137 * Sets the invalid value for this Result.
141 public void setInvalid(boolean invalid)
143 this.invalid = invalid;
147 * Gets the jobFailed value for this Result.
151 public boolean isJobFailed()
157 * Sets the jobFailed value for this Result.
161 public void setJobFailed(boolean jobFailed)
163 this.jobFailed = jobFailed;
167 * Gets the queued value for this Result.
171 public boolean isQueued()
177 * Sets the queued value for this Result.
181 public void setQueued(boolean queued)
183 this.queued = queued;
187 * Gets the running value for this Result.
191 public boolean isRunning()
197 * Sets the running value for this Result.
201 public void setRunning(boolean running)
203 this.running = running;
207 * Gets the serverError value for this Result.
209 * @return serverError
211 public boolean isServerError()
217 * Sets the serverError value for this Result.
221 public void setServerError(boolean serverError)
223 this.serverError = serverError;
227 * Gets the state value for this Result.
231 public int getState()
237 * Sets the state value for this Result.
241 public void setState(int state)
247 * Gets the status value for this Result.
251 public java.lang.String getStatus()
257 * Sets the status value for this Result.
261 public void setStatus(java.lang.String status)
263 this.status = status;
267 * Gets the suspended value for this Result.
271 public boolean isSuspended()
277 * Sets the suspended value for this Result.
281 public void setSuspended(boolean suspended)
283 this.suspended = suspended;
286 private java.lang.Object __equalsCalc = null;
288 public synchronized boolean equals(java.lang.Object obj)
290 if (!(obj instanceof Result))
292 Result other = (Result) obj;
297 if (__equalsCalc != null)
299 return (__equalsCalc == obj);
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();
320 private boolean __hashCodeCalc = false;
322 public synchronized int hashCode()
328 __hashCodeCalc = true;
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)
339 _hashCode += getState();
340 if (getStatus() != null)
342 _hashCode += getStatus().hashCode();
344 _hashCode += (isSuspended() ? Boolean.TRUE : Boolean.FALSE).hashCode();
345 __hashCodeCalc = false;