@Override public int hashCode() { int result = statusCode; result = 31 * result + (request != null ? request.hashCode() : 0); result = 31 * result + (response != null ? response.hashCode() : 0); result = 31 * result + (requestPath != null ? requestPath.hashCode() : 0); result = 31 * result + (nested ? 1 : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof MoefouException)) return false; final MoefouException that = (MoefouException) o; if (nested != that.nested) return false; if (statusCode != that.statusCode) return false; if (requestPath != null ? !requestPath.equals(that.requestPath) : that.requestPath != null) return false; if (response != null ? !response.equals(that.response) : that.response != null) return false; if (request != null ? !request.equals(that.request) : that.request != null) return false; return true; }
// implementations for Authorization @Override public String getAuthorizationHeader(final HttpRequest req) { return generateAuthorizationHeader( req.getMethod().name(), req.getURL(), req.getParameters(), oauthToken); }