Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

Commit bd57f48

Browse files
committed
add equals/hashCode
... let's see when we consider adding lombok et al... :)
1 parent e9e67cd commit bd57f48

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

engine/src/main/java/de/gesellix/docker/engine/EngineRequest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.util.HashMap;
55
import java.util.List;
66
import java.util.Map;
7+
import java.util.Objects;
78

89
public class EngineRequest {
910

@@ -115,4 +116,19 @@ public String getApiVersion() {
115116
public void setApiVersion(String apiVersion) {
116117
this.apiVersion = apiVersion;
117118
}
119+
120+
@Override
121+
public boolean equals(Object o) {
122+
if (this == o) { return true; }
123+
if (o == null || getClass() != o.getClass()) { return false; }
124+
EngineRequest that = (EngineRequest) o;
125+
return timeout == that.timeout && async == that.async && method == that.method && Objects.equals(path, that.path) && Objects.equals(headers, that.headers) &&
126+
Objects.equals(query, that.query) && Objects.equals(contentType, that.contentType) && Objects.equals(body, that.body) &&
127+
Objects.equals(attach, that.attach) && Objects.equals(stdout, that.stdout) && Objects.equals(apiVersion, that.apiVersion);
128+
}
129+
130+
@Override
131+
public int hashCode() {
132+
return Objects.hash(method, path, headers, query, contentType, body, timeout, async, attach, stdout, apiVersion);
133+
}
118134
}

0 commit comments

Comments
 (0)