01: package org.airtodo.db.types;
02:
03: import java.io.Serializable;
04:
05: public class Progress implements Serializable, Comparable {
06: private int value;
07:
08: public Progress(int value) {
09: this .value = value;
10: }
11:
12: public int getValue() {
13: return value;
14: }
15:
16: public void setValue(int value) {
17: this .value = value;
18: }
19:
20: public int compareTo(Object o) {
21: if (o instanceof Progress)
22: return new Integer(value).compareTo(((Progress) o).value);
23: return 1;
24: }
25:
26: @Override
27: public String toString() {
28: return String.valueOf(value);
29: }
30: }
|