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

org.postgresql.util.ClusterSpec Maven / Gradle / Ivy

There is a newer version: 5.0.0.9.pg
Show newest version
package io.mogdb.util;

import java.util.Arrays;

public class ClusterSpec implements Comparable {
    protected final HostSpec[] hostSpecs;

    public ClusterSpec(HostSpec[] hostSpecs) {
        this.hostSpecs = hostSpecs.clone();
    }

    public HostSpec[] getHostSpecs() {
        return hostSpecs.clone();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ClusterSpec that = (ClusterSpec) o;
        return Arrays.equals(hostSpecs, that.hostSpecs);
    }

    @Override
    public int hashCode() {
        return Arrays.hashCode(hostSpecs);
    }

    @Override
    public int compareTo(Object o) {
        return this.toString().compareTo(o.toString());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy