package com.atlassian.bitbucket.mesh.git.binary;

import com.atlassian.bitbucket.mesh.util.Version;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

public class SimpleGitBinary extends AbstractGitBinary {

    private final Version version;

    public SimpleGitBinary(@Nonnull String path, @Nonnull Version version) {
        super(path);

        this.version = requireNonNull(version, "version");
    }

    @Override
    @Nonnull
    public Version getVersion() {
        return version;
    }

    @Override
    public String toString() {
        return getPath() + " (" + version + ")";
    }
}
