45 |
* when the exception has been thrown. |
* when the exception has been thrown. |
46 |
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) |
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) |
47 |
*/ |
*/ |
48 |
public class CompletionStatus implements Serializable |
public class CompletionStatus |
49 |
|
implements Serializable |
50 |
{ |
{ |
51 |
/** |
/** |
52 |
* Use serialVersionUID for interoperability. |
* Use serialVersionUID for interoperability. |
53 |
*/ |
*/ |
54 |
private static final long serialVersionUID = -645279251430243097L; |
private static final long serialVersionUID = -9047319660881406859L; |
55 |
|
|
56 |
/** |
/** |
57 |
* The method was completed when the exception was thrown. |
* The method was completed when the exception was thrown. |
58 |
*/ |
*/ |
59 |
final static int _COMPLETED_YES = 0; |
static final int _COMPLETED_YES = 0; |
60 |
|
|
61 |
/** |
/** |
62 |
* The method was running when the exception was thrown. |
* The method was running when the exception was thrown. |
63 |
*/ |
*/ |
64 |
final static int _COMPLETED_NO = 1; |
static final int _COMPLETED_NO = 1; |
65 |
|
|
66 |
/** |
/** |
67 |
* The method was either running or complete (no exact information availabe) |
* The method was either running or complete (no exact information availabe) |
68 |
* when the exception was thrown. |
* when the exception was thrown. |
69 |
*/ |
*/ |
70 |
final static int _COMPLETED_MAYBE = 2; |
static final int _COMPLETED_MAYBE = 2; |
71 |
|
|
72 |
/** |
/** |
73 |
* An instance of CompletionStatus, initialized to {@link #COMPLETED_YES } |
* An instance of CompletionStatus, initialized to {@link #COMPLETED_YES } |
74 |
*/ |
*/ |
75 |
public final static CompletionStatus COMPLETED_YES = |
public static final CompletionStatus COMPLETED_YES = |
76 |
new CompletionStatus(_COMPLETED_YES); |
new CompletionStatus(_COMPLETED_YES); |
77 |
|
|
78 |
/** |
/** |
79 |
* An instance of CompletionStatus, initialized to {@link #COMPLETED_NO } |
* An instance of CompletionStatus, initialized to {@link #COMPLETED_NO } |
80 |
*/ |
*/ |
81 |
public final static CompletionStatus COMPLETED_NO = |
public static final CompletionStatus COMPLETED_NO = |
82 |
new CompletionStatus(_COMPLETED_NO); |
new CompletionStatus(_COMPLETED_NO); |
83 |
|
|
84 |
/** |
/** |
85 |
* An instance of CompletionStatus, initialized to {@link #COMPLETED_MAYBE } |
* An instance of CompletionStatus, initialized to {@link #COMPLETED_MAYBE } |
86 |
*/ |
*/ |
87 |
public final static CompletionStatus COMPLETED_MAYBE = |
public static final CompletionStatus COMPLETED_MAYBE = |
88 |
new CompletionStatus(_COMPLETED_MAYBE); |
new CompletionStatus(_COMPLETED_MAYBE); |
89 |
|
|
90 |
/** |
/** |
91 |
* The private array of all states. As long as the states form the uniform |
* The private array of all states. As long as the states form the uniform |
92 |
* sequence, from_int can find the needed value directly indexing this array. |
* sequence, from_int can find the needed value directly indexing this array. |
93 |
*/ |
*/ |
94 |
private final static CompletionStatus[] states = |
private static final CompletionStatus[] states = |
95 |
new CompletionStatus[] { COMPLETED_YES, COMPLETED_NO, COMPLETED_MAYBE }; |
new CompletionStatus[] { COMPLETED_YES, COMPLETED_NO, COMPLETED_MAYBE }; |
96 |
private final int _value; |
private final int _value; |
97 |
|
|