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

com.taobao.drc.clusterclient.partition.PartitionRef Maven / Gradle / Ivy

The newest version!
package com.taobao.drc.clusterclient.partition;

/**
 * @author yangyang
 * @since 17/6/21
 */
public class PartitionRef {
    private final String guid;
    private final String group;
    private final String partition;

    public PartitionRef(String guid, String group, String partition) {
        this.guid = guid;
        this.group = group;
        this.partition = partition;
    }

    public String getGuid() {
        return guid;
    }

    public String getGroup() {
        return group;
    }

    public String getPartition() {
        return partition;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PartitionRef that = (PartitionRef) o;

        if (guid != null ? !guid.equals(that.guid) : that.guid != null) return false;
        if (group != null ? !group.equals(that.group) : that.group != null) return false;
        return partition != null ? partition.equals(that.partition) : that.partition == null;
    }

    @Override
    public int hashCode() {
        int result = guid != null ? guid.hashCode() : 0;
        result = 31 * result + (group != null ? group.hashCode() : 0);
        result = 31 * result + (partition != null ? partition.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "{" +
                "guid='" + guid + '\'' +
                ", group='" + group + '\'' +
                ", partition='" + partition + '\'' +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy