/** * Returns true if this instance is equals to @code{o}. Note that equality is defined to NOT * include the average ping time. * * @param o the object to compare to * @return true if this instance is equals to @code{o} */ @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ServerDescription that = (ServerDescription) o; if (maxDocumentSize != that.maxDocumentSize) { return false; } if (maxMessageSize != that.maxMessageSize) { return false; } if (ok != that.ok) { return false; } if (!address.equals(that.address)) { return false; } if (!arbiters.equals(that.arbiters)) { return false; } if (!hosts.equals(that.hosts)) { return false; } if (!passives.equals(that.passives)) { return false; } if (primary != null ? !primary.equals(that.primary) : that.primary != null) { return false; } if (setName != null ? !setName.equals(that.setName) : that.setName != null) { return false; } if (setVersion != null ? !setVersion.equals(that.setVersion) : that.setVersion != null) { return false; } if (state != that.state) { return false; } if (!tags.equals(that.tags)) { return false; } if (type != that.type) { return false; } if (!version.equals(that.version)) { return false; } if (minWireVersion != that.minWireVersion) { return false; } if (maxWireVersion != that.maxWireVersion) { return false; } return true; }