io.github.devsecops.engine.domain.pom.model.SemanticVersion Maven / Gradle / Ivy
package io.github.devsecops.engine.domain.pom.model;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public class SemanticVersion {
private int major;
private int minor;
private int patch;
private String qualifier;
public SemanticVersion incrementPatch() {
this.patch++;
this.qualifier = "SNAPSHOT";
return this;
}
public String toString() {
return String.format("%s.%s.%s-%s", major, minor, patch, qualifier);
}
public boolean isSnapshot() {
return "SNAPSHOT".equals(qualifier);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy