From e2a99c333f6e5cc215ca2d005460b7848fec3fbd Mon Sep 17 00:00:00 2001 From: Karoliine Holter Date: Fri, 12 Jan 2024 10:57:42 +0200 Subject: [PATCH] Add equals and hash to AnalyzeParams --- .../java/api/messages/params/AnalyzeParams.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/api/messages/params/AnalyzeParams.java b/src/main/java/api/messages/params/AnalyzeParams.java index d197cd6..e9f5ff3 100644 --- a/src/main/java/api/messages/params/AnalyzeParams.java +++ b/src/main/java/api/messages/params/AnalyzeParams.java @@ -1,5 +1,7 @@ package api.messages.params; +import java.util.Objects; + public class AnalyzeParams { boolean reset; @@ -8,4 +10,16 @@ public AnalyzeParams(boolean reset) { this.reset = reset; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnalyzeParams that = (AnalyzeParams) o; + return reset == that.reset; + } + + @Override + public int hashCode() { + return Objects.hash(reset); + } }