File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/main/java/com/thealgorithms/datastructures/trees Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 161161 <!-- Checks for common coding problems -->
162162 <!-- See https://checkstyle.org/checks/coding/index.html -->
163163 <module name =" EmptyStatement" />
164- <!-- TODO < module name="EqualsHashCode"/> -- >
164+ <module name =" EqualsHashCode" />
165165 <!-- TODO <module name="HiddenField"/> -->
166166 <module name =" IllegalInstantiation" />
167167 <!-- TODO <module name="InnerAssignment"/> -->
Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ public boolean equals(Object obj) {
8181 return false ;
8282 }
8383
84+ @ Override
85+ public int hashCode () {
86+ return Arrays .hashCode (coordinates );
87+ }
88+
8489 @ Override
8590 public String toString () {
8691 return Arrays .toString (coordinates );
You can’t perform that action at this time.
0 commit comments