All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.devsecops.engine.domain.pom.model.SemanticVersion Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
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