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

com.exasol.projectkeeper.RepoInfo Maven / Gradle / Ivy

There is a newer version: 4.4.0
Show newest version
package com.exasol.projectkeeper;

import java.util.Objects;

import javax.annotation.processing.Generated;

/**
 * This class groups information about a repository.
 */
public final class RepoInfo {
    /** Reference to a parent pom or {@code null}. */
    private final String repoName;
    /** Name of the project's license. */
    private final String licenseName;

    /**
     * Create a new {@link RepoInfo}.
     * 
     * @param repoName    repository name
     * @param licenseName license name
     */
    public RepoInfo(final String repoName, final String licenseName) {
        this.repoName = repoName;
        this.licenseName = licenseName;
    }

    /**
     * Get the repository name.
     * 
     * @return repository name
     */
    public String getRepoName() {
        return repoName;
    }

    /**
     * Get the license name.
     * 
     * @return license name
     */
    public String getLicenseName() {
        return licenseName;
    }

    @Override
    public String toString() {
        return "RepoInfo [repoName=" + repoName + ", licenseName=" + licenseName + "]";
    }

    @Generated("vscode")
    @Override
    public int hashCode() {
        return Objects.hash(repoName, licenseName);
    }

    @Generated("vscode")
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final RepoInfo other = (RepoInfo) obj;
        return Objects.equals(repoName, other.repoName) && Objects.equals(licenseName, other.licenseName);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy