com.netgrif.application.engine.petrinet.domain.version.Version Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.petrinet.domain.version;
import com.netgrif.application.engine.petrinet.domain.VersionType;
import lombok.AllArgsConstructor;
import lombok.Data;
import static com.netgrif.application.engine.petrinet.domain.VersionType.MAJOR;
import static com.netgrif.application.engine.petrinet.domain.VersionType.MINOR;
@Data
@AllArgsConstructor
public class Version {
public static final String NEWEST = "^";
private long major;
private long minor;
private long patch;
public Version() {
major = 1;
minor = 0;
patch = 0;
}
@Override
public String toString() {
return major + "." + minor + "." + patch;
}
public void increment(VersionType type) {
if (type == MAJOR) {
major += 1;
minor = 0;
patch = 0;
} else if (type == MINOR) {
minor += 1;
patch = 0;
} else {
patch += 1;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy