@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FetcherPolicy other = (FetcherPolicy) obj; if (_acceptLanguage == null) { if (other._acceptLanguage != null) return false; } else if (!_acceptLanguage.equals(other._acceptLanguage)) return false; if (_crawlDelay != other._crawlDelay) return false; if (_crawlEndTime != other._crawlEndTime) return false; if (_fetcherMode == null) { if (other._fetcherMode != null) return false; } else if (!_fetcherMode.equals(other._fetcherMode)) return false; if (_maxConnectionsPerHost != other._maxConnectionsPerHost) return false; if (_maxContentSize != other._maxContentSize) return false; if (_maxRedirects != other._maxRedirects) return false; if (_maxRequestsPerConnection != other._maxRequestsPerConnection) return false; if (_minResponseRate != other._minResponseRate) return false; if (_redirectMode == null) { if (other._redirectMode != null) return false; } else if (!_redirectMode.equals(other._redirectMode)) return false; if (_requestTimeout != other._requestTimeout) return false; if (_validMimeTypes == null) { if (other._validMimeTypes != null) return false; } else if (!_validMimeTypes.equals(other._validMimeTypes)) return false; return true; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((_acceptLanguage == null) ? 0 : _acceptLanguage.hashCode()); result = prime * result + (int) (_crawlDelay ^ (_crawlDelay >>> 32)); result = prime * result + (int) (_crawlEndTime ^ (_crawlEndTime >>> 32)); result = prime * result + ((_fetcherMode == null) ? 0 : _fetcherMode.hashCode()); result = prime * result + _maxConnectionsPerHost; result = prime * result + _maxContentSize; result = prime * result + _maxRedirects; result = prime * result + _maxRequestsPerConnection; result = prime * result + _minResponseRate; result = prime * result + ((_redirectMode == null) ? 0 : _redirectMode.hashCode()); result = prime * result + (int) (_requestTimeout ^ (_requestTimeout >>> 32)); result = prime * result + ((_validMimeTypes == null) ? 0 : _validMimeTypes.hashCode()); return result; }