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

com.ctrlflow.aer.client.dto.Bundle Maven / Gradle / Ivy

Go to download

Data-transfer objects for communication with the Ctrlflow Automated Error Reporting server.

The newest version!
package com.ctrlflow.aer.client.dto;

/**
 * @since 2.0.0
 */
public class Bundle {

    private String name;

    private String version;

    public Bundle() {
    }

    public Bundle(String name, String version) {
        this.setName(name);
        this.setVersion(version);
    }

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

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVersion() {
        return this.version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (name == null ? 0 : name.hashCode());
        result = prime * result + (version == null ? 0 : version.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Bundle other = (Bundle) obj;
        if (name == null) {
            if (other.name != null) {
                return false;
            }
        } else if (!name.equals(other.name)) {
            return false;
        }
        if (version == null) {
            if (other.version != null) {
                return false;
            }
        } else if (!version.equals(other.version)) {
            return false;
        }
        return true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy