class Endpoint {

    @Override
    public boolean equals(final Object otherInstance) {
        if (otherInstance == null || !(otherInstance instanceof Endpoint)) {
            return false;
        }
        final Endpoint other = (Endpoint) otherInstance;

        if (!this.name.equals(other.name)
                || !this.host.equals(other.host)
                || this.port != other.port) {
            return false;
        }
        return true;
    }

    public  Endpoint(final String name, final String host, final int port);

}