Generate equals and hashCode for Request

This commit is contained in:
XiangRongLin 2020-12-15 15:10:21 +01:00
parent 4dad3d60d6
commit 1bcb9c76a7
1 changed files with 23 additions and 0 deletions

View File

@ -241,4 +241,27 @@ public class Request {
return headers;
}
/*//////////////////////////////////////////////////////////////////////////
// Generated
//////////////////////////////////////////////////////////////////////////*/
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Request request = (Request) o;
return httpMethod.equals(request.httpMethod) &&
url.equals(request.url) &&
headers.equals(request.headers) &&
Arrays.equals(dataToSend, request.dataToSend) &&
Objects.equals(localization, request.localization);
}
@Override
public int hashCode() {
int result = Objects.hash(httpMethod, url, headers, localization);
result = 31 * result + Arrays.hashCode(dataToSend);
return result;
}
}