We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf6c87c commit fedecd4Copy full SHA for fedecd4
checkstyle.xml
@@ -161,7 +161,7 @@
161
<!-- Checks for common coding problems -->
162
<!-- See https://checkstyle.org/checks/coding/index.html -->
163
<module name="EmptyStatement"/>
164
- <!-- TODO <module name="EqualsHashCode"/> -->
+ <module name="EqualsHashCode"/>
165
<!-- TODO <module name="HiddenField"/> -->
166
<module name="IllegalInstantiation"/>
167
<!-- TODO <module name="InnerAssignment"/> -->
src/main/java/com/thealgorithms/datastructures/trees/KDTree.java
@@ -81,6 +81,11 @@ public boolean equals(Object obj) {
81
return false;
82
}
83
84
+ @Override
85
+ public int hashCode() {
86
+ return Arrays.hashCode(coordinates);
87
+ }
88
+
89
@Override
90
public String toString() {
91
return Arrays.toString(coordinates);
0 commit comments