Удалил equals и hashCode
This commit is contained in:
parent
e71083fa91
commit
53912a7a75
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>dev.struchkov</groupId>
|
||||
<artifactId>autoresponder</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<version>3.5.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Abstract Autoresponder</name>
|
||||
@ -27,7 +27,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<haiti.utils.ver>1.2.0</haiti.utils.ver>
|
||||
<haiti.utils.ver>1.4.0</haiti.utils.ver>
|
||||
|
||||
<junit.ver>5.8.2</junit.ver>
|
||||
<slf4j.ver>1.7.36</slf4j.ver>
|
||||
|
@ -1,7 +1,6 @@
|
||||
package dev.struchkov.autoresponder.entity;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.regex.Pattern;
|
||||
@ -130,27 +129,4 @@ public abstract class Unit<U extends Unit<U, M>, M extends DeliverableText> {
|
||||
this.triggerCheck = triggerCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Unit<?, ?> unit = (Unit<?, ?>) o;
|
||||
return Objects.equals(triggerWords, unit.triggerWords) && Objects.equals(phrases, unit.phrases) && Objects.equals(matchThreshold, unit.matchThreshold) && Objects.equals(priority, unit.priority);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(triggerWords, phrases, matchThreshold, priority);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Unit{" +
|
||||
"keyWords=" + triggerWords +
|
||||
", phrases='" + phrases + '\'' +
|
||||
", matchThreshold=" + matchThreshold +
|
||||
", priority=" + priority +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user