@Override
    public boolean equals(Object o) {
        if (o == this) return true;
        if (!(o instanceof MongoDatabaseCredentials)) return false;
        final MongoDatabaseCredentials other = (MongoDatabaseCredentials) o;

        return this.getAddress().equals(other.getAddress()) &&
                this.getPort() == other.getPort() &&
                this.getDatabase().equals(other.getDatabase()) &&
                this.getUsername().equals(other.getUsername()) &&
                this.getPassword().equals(other.getPassword());
    }
Represents the credentials for a remote database.
helper-mongo/src/main/java/me/lucko/helper/mongo/MongoDatabaseCredentials.java