- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask.java
More file actions
Latest commit
19 lines (14 loc) · 441 Bytes
/
Copy pathTask.java
File metadata and controls
19 lines (14 loc) · 441 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
packagepers.ccoffline.task;
importjava.util.concurrent.atomic.AtomicInteger;
publicclassTask<R> {
privateRret;
privateAtomicIntegerstatus;
privatestaticfinalintINIT = 0;
privatestaticfinalintREADY = 1;
privatestaticfinalintRUNNING = 2;
privatestaticfinalintFINISHED = 3;
privatestaticfinalintERROR = 4;
publicbooleanisReady() {
returnstatus.get() == READY;
}
}