class NuxeoVersion {

    public String version() {
        StringBuilder version = new StringBuilder();
        version.append(majorVersion()).append('.').append(minorVersion());
        if (buildVersion() != -1) {
            version.append('.').append(buildVersion());
        }
        if (hotfix() != 0) {
            version.append("-HF").append(String.format("%02d", hotfix()));
        }
        if (snapshot()) {
            version.append("-SNAPSHOT");
        }
        return version.toString();
    }

    protected  NuxeoVersion(int majorVersion, int minorVersion, int buildVersion, int hotfix, boolean snapshot);

}