Adding #equals to Parameters (#653)

This commit is contained in:
stefan
2020-12-12 19:58:05 +01:00
parent bc5a119169
commit 8337cce382

View File

@@ -52,4 +52,13 @@ public class Parameters {
return Objects.hash(localHost, localPort, remoteHost, remotePort);
}
@Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (!(obj instanceof Parameters)) { return false; }
Parameters other = (Parameters) obj;
return Objects.equals(localHost, other.localHost) && localPort == other.localPort &&
Objects.equals(remoteHost, other.remoteHost) && remotePort == other.remotePort;
}
}