public boolean equals(Object other) { if (other == null || other.getClass() != this.getClass()) { return false; } NewsAddress address = (NewsAddress) other; return ( address.host == host || host != null && host.equals(address.host)) && (address.newsgroup == newsgroup || newsgroup != null && newsgroup.equals(address.newsgroup));
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof NewsAddress)) return false;  final NewsAddress newsAddress = (NewsAddress) o;  if (!host.equals(newsAddress.host)) return false; if (!newsgroup.equals(newsAddress.newsgroup)) return false;  return true;
    public boolean equals(Object other) {        if (other == null || other.getClass() != this.getClass()) {            return false;        }        NewsAddress address = (NewsAddress) other;        return (            address.host == host || host != null && host.equals(address.host))            && (address.newsgroup == newsgroup                || newsgroup != null                && newsgroup.equals(address.newsgroup));    }