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

pl.allegro.tech.build.axion.release.domain.VersionContext Maven / Gradle / Ivy

There is a newer version: 1.18.15
Show newest version
package pl.allegro.tech.build.axion.release.domain;

import com.github.zafarkhaja.semver.Version;
import pl.allegro.tech.build.axion.release.domain.scm.ScmPosition;

public class VersionContext {

    private final Version version;
    private final boolean snapshot;
    private final Version previousVersion;
    private final ScmPosition position;

    public VersionContext(Version version, boolean snapshot, Version previousVersion, ScmPosition position) {
        this.version = version;
        this.snapshot = snapshot;
        this.previousVersion = previousVersion;
        this.position = position;
    }

    public final Version getVersion() {
        return version;
    }

    public final boolean isSnapshot() {
        return snapshot;
    }

    public final Version getPreviousVersion() {
        return previousVersion;
    }

    public final ScmPosition getPosition() {
        return position;
    }

    @Override
    public String toString() {
        return "VersionContext{" +
            "version=" + version +
            ", snapshot=" + snapshot +
            ", previousVersion=" + previousVersion +
            ", position=" + position +
            '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy