30 lines
No EOL
1 KiB
Text
30 lines
No EOL
1 KiB
Text
package {{v packageName/}};
|
|
|
|
import java.util.Date;
|
|
|
|
public final class {{v className/}} implements Comparable<{{v className/}}> {
|
|
public static final String PROJECT = "{{v project/}}";
|
|
public static final Date BUILD_DATE = new Date({{v epoch/}}L);
|
|
public static final int MAJOR = {{v major/}};
|
|
public static final int MINOR = {{v minor/}};
|
|
public static final int REVISION = {{v revision/}};
|
|
public static final String QUALIFIER = "{{v qualifier/}}";
|
|
public static final String VERSION = "{{v version/}}";
|
|
|
|
private {{v className/}}() {
|
|
// no-op
|
|
}
|
|
|
|
@Override
|
|
public int compareTo({{v className/}} other) {
|
|
if (MAJOR != other.MAJOR) {
|
|
return Integer.compare(MAJOR, other.MAJOR);
|
|
} else if (MINOR != other.MINOR) {
|
|
return Integer.compare(MINOR, other.MINOR);
|
|
} else if (REVISION != other.REVISION) {
|
|
return Integer.compare(REVISION, other.REVISION);
|
|
} else {
|
|
return QUALIFIER.compareTo(other.QUALIFIER);
|
|
}
|
|
}
|
|
} |