JAL-3878 Remove throws declaration from param store construction.
[jalview.git] / src / jalview / ws2 / WSJobState.java
1 package jalview.ws2;
2
3
4 public enum WSJobState
5 {
6   INVALID, READY, SUBMITTED, QUEUED, RUNNING, FINISHED, BROKEN, FAILED,
7   UNKNOWN, SERVER_ERROR, CANCELLED;
8
9   public boolean isSubmitted()
10   {
11     switch (this)
12     {
13     case INVALID:
14     case READY:
15       return false;
16     default:
17       return true;
18     }
19   }
20
21   public boolean isCancelled()
22   {
23     return this == WSJobState.CANCELLED;
24   }
25
26   public boolean isDone()
27   {
28     switch (this)
29     {
30     case INVALID:
31     case READY:
32     case SUBMITTED:
33     case QUEUED:
34     case RUNNING:
35       return false;
36     default:
37       return true;
38     }
39   }
40
41   public boolean isRunning()
42   {
43     switch (this)
44     {
45     case QUEUED:
46     case RUNNING:
47       return true;
48     default:
49       return false;
50     }
51   }
52
53   public boolean isQueued()
54   {
55     return this == WSJobState.SUBMITTED;
56   }
57 }