1 /* Copyright (c) 2009 Peter Troshin
\r
3 * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0
\r
5 * This library is free software; you can redistribute it and/or modify it under the terms of the
\r
6 * Apache License version 2 as published by the Apache Software Foundation
\r
8 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
\r
9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache
\r
10 * License for more details.
\r
12 * A copy of the license is in apache_license.txt. It is also available here:
\r
13 * @see: http://www.apache.org/licenses/LICENSE-2.0.txt
\r
15 * Any republication or derived work distributed in source code form
\r
16 * must include this copyright and license notice.
\r
19 package compbio.engine;
\r
21 import compbio.util.Util;
\r
22 import compbio.util.annotation.Immutable;
\r
23 import compbio.engine.client.EngineUtil;
\r
26 public class ClusterJobId {
\r
30 public ClusterJobId(String jobId) {
\r
31 if (Util.isEmpty(jobId)) {
\r
32 throw new NullPointerException("JobId must be provided!");
\r
34 if (EngineUtil.isValidJobId(jobId)) {
\r
35 throw new IllegalArgumentException("JobId is expected but taskid seems to be provided! " + jobId);
\r
40 public String getJobId() {
\r
45 public int hashCode() {
\r
46 final int prime = 31;
\r
48 result = prime * result + ((jobId == null) ? 0 : jobId.hashCode());
\r
53 public boolean equals(Object obj) {
\r
58 if (getClass() != obj.getClass())
\r
60 ClusterJobId other = (ClusterJobId) obj;
\r
61 if (jobId == null) {
\r
62 if (other.jobId != null)
\r
64 } else if (!jobId.equals(other.jobId))
\r